diff options
Diffstat (limited to 'Tests/CMakeTests')
-rw-r--r-- | Tests/CMakeTests/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/CMakeTests/VersionTest.cmake.in | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Tests/CMakeTests/CMakeLists.txt b/Tests/CMakeTests/CMakeLists.txt index 9e3c3e7..e8ed3a3 100644 --- a/Tests/CMakeTests/CMakeLists.txt +++ b/Tests/CMakeTests/CMakeLists.txt @@ -15,6 +15,7 @@ AddCMakeTest(Include "") AddCMakeTest(FindBase "") AddCMakeTest(Toolchain "") AddCMakeTest(GetFilenameComponentRealpath "") +AddCMakeTest(Version "") SET(GetPrerequisites_PreArgs "-DCTEST_CONFIGURATION_TYPE:STRING=\\\${CTEST_CONFIGURATION_TYPE}" diff --git a/Tests/CMakeTests/VersionTest.cmake.in b/Tests/CMakeTests/VersionTest.cmake.in new file mode 100644 index 0000000..215bb2b --- /dev/null +++ b/Tests/CMakeTests/VersionTest.cmake.in @@ -0,0 +1,9 @@ +set(min_ver 2.7.20090305) +cmake_minimum_required(VERSION ${min_ver}) + +if("${CMAKE_VERSION}" VERSION_LESS "${min_ver}") + message(FATAL_ERROR + "CMAKE_VERSION=[${CMAKE_VERSION}] is less than [${min_ver}]") +else() + message("CMAKE_VERSION=[${CMAKE_VERSION}] is not less than [${min_ver}]") +endif() |