CMakeLists.txt has lower minimum required version to features used
Closed this issue · 3 comments
ljden commented
The cmake file only requires v3.2 cmake_minimum_required(VERSION 3.2)
but has at least one feature only introduced in v3.14.
ARCH_INDEPENDENT
was added in v3.14 https://cmake.org/cmake/help/v3.14/release/3.14.html#modules
This means building with cmake >=v3.2, <v3.14 fails:
user:~/.apps/trompeloeil/build$ cmake -G "Unix Makefiles" ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.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
CMake Error at /usr/share/cmake-3.10/Modules/WriteBasicConfigVersionFile.cmake:30 (message):
Unknown keywords given to WRITE_BASIC_CONFIG_VERSION_FILE():
"ARCH_INDEPENDENT"
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/CMakePackageConfigHelpers.cmake:207 (write_basic_config_version_file)
CMakeLists.txt:9 (write_basic_package_version_file)
rollbear commented
Thank you. I bumped the version required to 3.14. It's a bit weird that CMake has this feature, but doesn't check if you violate the constraints.
rollbear commented
Leaving this open until a release is tagged.
ljden commented
I think the minimum versions is more so used for cmake policies, so minor feature adds like this aren't tested