Magnetic instabilities in Ce compounds: Effect of pressure and chemical composition