ycollet / coinor-cmake

CMake files for compiling CoinOr projects
GNU Lesser General Public License v3.0
31 stars 9 forks source link

cmake error "Unknown arguments" #6

Open kingaj12 opened 6 years ago

kingaj12 commented 6 years ago

Hi - thanks for doing this! I am very much looking forward to using it.

I ran the cmake command you recommended and got the following error

CMake Error at Clp/CMakeLists.txt:242 (if):
  if given arguments:
"CMAKE_COMPILER_IS_GNUCXX" "AND" "(" "CMAKE_CXX_COMPILER_VERSION" "VERSION_GREATER_EQUAL" "4.4" ")"
  Unknown arguments specified
-- Configuring incomplete, errors occurred!

I am using gcc and cmake versions:

$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
$ cmake --version
cmake version 3.5.1
ycollet commented 6 years ago

Thanks for the report. I will bet that the problem comes from VERSION_GREATER_EQUAL which was certainly not available in cmake 3.5.1 ... I try to find a fix and commit this ASAP

ycollet commented 6 years ago

VERSION_GREATER_EQUAL has been introduced in 3.7.0 ...

ycollet commented 6 years ago

VERSION_GREATER_EQUAL has been introduced in 3.7.0 ...

commit da5b2ea26427b7220c4d41c5b6e4c9e460baaa7c fix this problem

kingaj12 commented 6 years ago

OK - thanks for being so responsive!! But I should probably try to install cmake 3.7.0. Do you know if there is a reason that Ubuntu apt is behind?

ycollet commented 6 years ago

No idea why ubuntu has an old version of cmake. Maybe it's a conservative choice: stay with cmake-3.5 during all life of this ubuntu version