bbopt / nomad

NOMAD - A blackbox optimization software
https://nomad-4-user-guide.readthedocs.io/
GNU Lesser General Public License v3.0
116 stars 24 forks source link

cmake 3.14 is not enough #57

Open paulduf opened 2 years ago

paulduf commented 2 years ago

Hello,

My laptop is running under Unbuntu 18.04. I tried first to build the software using first the stable system version of cmake (3.10) but I got an error managed on your own telling me that I must use cmake > 3.14. I updated cmake to 3.14.7 and tried again but stopped at the end of the process with an error related to the POP_BACK command, which may be available only in later versions of cmake (at least I see it available in 3.22, then I will try again with a more recent cmake version, but this should be documented and corrected anyway).

EDIT: I can confirm everything is fine with cmake 3.22.0

I give you the full output:

(sci386) user@paulduf:~/workspace/nomad (master)$ cmake -DBUILD_INTERFACES=ON -S . -B build/release
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CHECK_START Configuring custom options
--   Installation prefix set to /home/pauldufosse/workspace/nomad/build/release
CHECK_START  Configuring for use of Sgtelib library
CHECK_PASS   Sgtelib found. done
--   Test OpenMP for parallel functionalities  -- found 
CHECK_START  Configuring build for library and batch mode examples
--     Add example library test 1
--     Add example library test 2
--     Add example library test 3
--     Add example library test single_obj_parallel
--     Add example library tests using Suggest And Observe
--     Add example batch test 1
--     Add example batch test 2
--     Add example batch test single_obj
--     Add example batch test surrogate sort
--     Add example batch test single_obj_parallel
CHECK_PASS done
CHECK_START  Configuring build for interfaces
CHECK_PASS done
CMake Error at CMakeLists.txt:145 (list):
  list does not recognize sub-command POP_BACK

CHECK_PASS done
-- Configuring incomplete, errors occurred!
ctribes commented 2 years ago

Thanks. Indeed the POP_BACK sub-command to format the display is not supported in CMake 3.14 but is available in 3.15 and up.

Another option is to replace line 145: list(POP_BACK CMAKE_MESSAGE_INDENT) replaced by list(REMOVE_ITEM CMAKE_MESSAGE_INDENT " ") which is supported by CMake 3.14