summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests/VersionTest.cmake.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-03-05 20:17:07 (GMT)
committerBrad King <brad.king@kitware.com>2009-03-05 20:17:07 (GMT)
commit98c51ff6dcd5e6aa80050cfc00f19eb6092e79c0 (patch)
tree8aabdbd5936493a3808cf1184620ebf08ef1d8ff /Tests/CMakeTests/VersionTest.cmake.in
parent83f39ba41b2c8969db2b44761d5fed363dc170b5 (diff)
downloadCMake-98c51ff6dcd5e6aa80050cfc00f19eb6092e79c0.zip
CMake-98c51ff6dcd5e6aa80050cfc00f19eb6092e79c0.tar.gz
CMake-98c51ff6dcd5e6aa80050cfc00f19eb6092e79c0.tar.bz2
ENH: Overhaul CMake version numbering
This moves the version numbers into an isolated configured header so that not all of CMake needs to rebuild when the version changes. Previously we had spaces, dashes and/or the word 'patch' randomly chosen before the patch number. Now we always report version numbers in the traditional format "<major>.<minor>.<patch>[-rc<rc>]". We still use odd minor numbers for development versions. Now we also use the CCYYMMDD date as the patch number of development versions, thus allowing tests for exact CMake versions.
Diffstat (limited to 'Tests/CMakeTests/VersionTest.cmake.in')
-rw-r--r--Tests/CMakeTests/VersionTest.cmake.in9
1 files changed, 9 insertions, 0 deletions
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()