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 3.6 error #59

Closed doblinsky closed 7 years ago

doblinsky commented 7 years ago

I'm getting the following error

CMake Error at CMakeLists.txt:78 (set_target_properties): set_target_properties called with incorrect number of arguments.

CMake Error at CMakeLists.txt:106 (install): install TARGETS given no LIBRARY DESTINATION for shared library target "chemps2-shared".

CMake Error at CMakeLists.txt:113 (install): install TARGETS given no ARCHIVE DESTINATION for static library target "chemps2-static".

CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.6)

should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000".

SebWouters commented 7 years ago

@doblinsky What is the OS version and cmake version you are working with?

@loriab What is the lowest version of cmake required to run your changes re. the postponed destination specification? cmake 3.5.2 (on ubuntu 16.10) appears to work.

SebWouters commented 7 years ago

@doblinsky Could it be that you tried to build from

/topdir/CheMPS2/CMakeLists.txt

instead of

/topdir/CMakeLists.txt

? In the latter, cmake_minimum_required is specified. In addition, http://stackoverflow.com/questions/3221996/set-target-properties-called-with-incorrect-number-of-arguments indicates that

${CheMPS2_LIB_SOVERSION}

could have been not set, which can issue error

set_target_properties called with incorrect number of arguments.

As this variable is set in

/topdir/CMakeLists.txt

this also points into the direction that you could have started from the wrong CMakeLists.txt file.

loriab commented 7 years ago

I know 3.3 works, and I tried to be mindful of your older min. But it's possible that 3.0 or 3.1 is true min.

Sent from my iPhone

On Apr 17, 2017, at 7:41 PM, Sebastian Wouters notifications@github.com wrote:

@doblinsky Could it be that you tried to build from

/topdir/CheMPS2/CMakeLists.txt instead of

/topdir/CMakeLists.txt ? In the latter, cmake_minimum_required is specified. In addition, http://stackoverflow.com/questions/3221996/set-target-properties-called-with-incorrect-number-of-arguments indicates that

${CheMPS2_LIB_SOVERSION} could have been not set, which can issue error

set_target_properties called with incorrect number of arguments. As this variable is set in

/topdir/CMakeLists.txt this also points into the direction that you could have started from the wrong CMakeLists.txt file.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

doblinsky commented 7 years ago

I am using Cent OS 7.2 with cmake 3.6.3

I was making in the wrong directory, I was making in /sourcefolder/CheMPS2/CheMPS2/build

Thanks it seems to be working