CentOS 6.8 provides cmake 2.8.12.2 which fails to configure the current XCDF master:
CMake Error at CMakeLists.txt:31 (CMAKE_POLICY):
Policy "CMP0026" is not known to this version of CMake.
CMake Error at CMakeLists.txt:32 (CMAKE_POLICY):
Policy "CMP0042" is not known to this version of CMake.
This is due to the following check in CMakeLists.txt which, I guess, wass meant to identify cmake 3:
IF ("${CMAKE_VERSION}" VERSION_GREATER 2.8.12)
CMAKE_POLICY(SET CMP0026 OLD) # Read LOCATION properties from build targets
CMAKE_POLICY(SET CMP0042 OLD) # Disable @rpath in target install name
ENDIF()
Simple patch:
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,7 +27,7 @@ ENDIF ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
IF (COMMAND cmake_policy)
CMAKE_POLICY(SET CMP0009 NEW) # Do not follow symlinks w/ FILE_GLOB_RECURSE
- IF ("${CMAKE_VERSION}" VERSION_GREATER 2.8.12)
+ IF ("${CMAKE_VERSION}" VERSION_GREATER 2.8.12.2)
CMAKE_POLICY(SET CMP0026 OLD) # Read LOCATION properties from build targets
CMAKE_POLICY(SET CMP0042 OLD) # Disable @rpath in target install name
ENDIF()
But most likely only the major version of cmake should be checked instead of the full version string.
CentOS 6.8 provides cmake 2.8.12.2 which fails to configure the current XCDF master:
This is due to the following check in CMakeLists.txt which, I guess, wass meant to identify cmake 3:
Simple patch:
But most likely only the major version of cmake should be checked instead of the full version string.