SebWouters / CheMPS2

CheMPS2: a spin-adapted implementation of DMRG for ab initio quantum chemistry
GNU General Public License v2.0
68 stars 34 forks source link

CMake 2.8 #60

Closed quanp closed 7 years ago

quanp commented 7 years ago

Hi Sebastian,

Using CMake 2.8.12, I had this error

CMake Error at CheMPS2/CMakeLists.txt:2 (cmake_policy):
  Policy "CMP0028" is not known to this version of CMake.

I think CMake newer than 3.0.2 must be used since this policy was introduced in CMake version 3.0 https://cmake.org/cmake/help/v3.0/policy/CMP0028.html

Best regards, Quan

loriab commented 7 years ago

Good point. Are you actually running 2.8.12? If so, if you comment out the policy line, can you build (or where do you error)? That policy is only doing something special if it sees :: so as to generate warnings, so potentially it can be overlooked.

quanp commented 7 years ago

Yes, we had some machines with 2.8.12. Commenting out the policy line gives problem finding HDF5

CMake Error at CMake/FindTargetHDF5.cmake:71 (add_library):
  Cannot find source file:

    INTERFACE

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx
Call Stack (most recent call first):
  CMakeLists.txt:123 (find_package)
loriab commented 7 years ago

Ok, that's serious, it's just not going to permit the creation of an interface library (added in 3.0, now that I look), and instead demand ${Package_LIBRARIES}, etc. variables. @SebWouters, would you consider bumping the requirements? 2.8.12 was released Oct 2013 and 3.0 Jun 2014.

From a practical point of view, @quanp, I know that Miniconda (download istaller and bash it; don't need root) and conda install hdf5 cmake will get workable version.

SebWouters commented 7 years ago

Sure. No problem to bump the CMake version to 3.something. Will do a.s.a.p.