EMsoft-org / EMsoft

Public EMsoft repository
Other
61 stars 94 forks source link

CMake command FetchContent_MakeAvailable introduced in CMake version 3.14? #93

Closed hakonanes closed 4 years ago

hakonanes commented 4 years ago

Building EMsoft 5.0 with cmake version 3.12.1 I get

> cmake --version
cmake version 3.12.1
> cmake -DCMAKE_BUILD_TYPE=Release -DEMsoft_SDK=/home/hakonwii/emsoft/EMsoft_SDK -DEMsoft_ENABLE_EMsoftWorkbench=OFF /home/hakonwii/emsoft/EMsoft
-- The Current Build type being used is Release
-- BUILD_SHARED_LIBS: OFF
-- Support Lib Exists: /home/hakonwii/emsoft/EMsoft_SDK/jsonfortran-4.2.1-Release/lib64/cmake/jsonfortran-gnu-4.2.1
-- Support Lib Exists: /home/hakonwii/emsoft/EMsoft_SDK/bcls-0.1-Release/lib/cmake/bcls
-- Support Lib Exists: /home/hakonwii/emsoft/EMsoft_SDK/CLFortran-0.0.1-Release/lib/cmake/CLFortran
-- Support Lib Exists: /home/hakonwii/emsoft/EMsoft_SDK/hdf5-1.8.20-Release/share/cmake
-- ********* STARTING EMsoft CONFIGURATION ***********************
-- EMsoft_SDK Location: /home/hakonwii/emsoft/EMsoft_SDK
CMake Error at CMakeLists.txt:200 (FetchContent_MakeAvailable):
  Unknown CMake command "FetchContent_MakeAvailable".

The release notes for cmake version 3.14 (https://cmake.org/cmake/help/v3.14/release/3.14.html#modules) mentions this command as new in that version... Should cmake_minimum_required be adjusted to 3.14?

hakonanes commented 4 years ago

After reverting to the commit before the use of the CMake command was introduced (d8bea98a0bbb5667e4590f84fd9c89614e212fff), I'm now told that to build the SHTfile project I need CMake 3.14.

marcdegraef commented 4 years ago

Yes, you are correct; you should use 3.14.5 or more recent... I have updated this on the Superbuild and EMsoft repositories.

hakonanes commented 4 years ago

Great, thanks.