Anisotropic three-dimensional magnetism in CaFe2As2