summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-04-20 15:20:48 (GMT)
committerBrad King <brad.king@kitware.com>2012-04-20 15:25:55 (GMT)
commit0c7029c6420d6387b74a85bb8e62194e80b4e879 (patch)
tree32cf9f5b3d8c1098c06712930cfc890c8bbf73dd /CMakeLists.txt
parent20ba4fe1bf3d753ecc6f482aeb922582a6b99a1f (diff)
downloadCMake-0c7029c6420d6387b74a85bb8e62194e80b4e879.zip
CMake-0c7029c6420d6387b74a85bb8e62194e80b4e879.tar.gz
CMake-0c7029c6420d6387b74a85bb8e62194e80b4e879.tar.bz2
Refactor CMake version handling
Move the CMake version number components out of "CMakeLists.txt" into dedicated file "Source/CMakeVersion.cmake". Set the TWEAK level to the date explicitly. Add a "Source/CMakeVersion.bash" script to update the date, thus replacing KWSys DateStamp for CMake. Teach the bootstrap script to extract the version components from their new location.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt19
1 files changed, 3 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9a88d5f..b1d5930 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -422,26 +422,13 @@ ENDIF()
# The main section of the CMakeLists file
#
#-----------------------------------------------------------------------
-# The CMake version number.
-SET(CMake_VERSION_MAJOR 2)
-SET(CMake_VERSION_MINOR 8)
-SET(CMake_VERSION_PATCH 8)
-#SET(CMake_VERSION_TWEAK 0)
-#SET(CMake_VERSION_RC 1)
-
-# Releases define a tweak level.
-IF(DEFINED CMake_VERSION_TWEAK)
+INCLUDE(Source/CMakeVersion.cmake)
+# Releases define a small tweak level.
+IF("${CMake_VERSION_TWEAK}" VERSION_LESS 20000000)
SET(CMake_VERSION_IS_RELEASE 1)
SET(CMake_VERSION_SOURCE "")
ELSE()
SET(CMake_VERSION_IS_RELEASE 0)
-
- # Use the date as the tweak level.
- INCLUDE(${CMake_SOURCE_DIR}/Source/kwsys/kwsysDateStamp.cmake)
- SET(CMake_VERSION_TWEAK
- "${KWSYS_DATE_STAMP_YEAR}${KWSYS_DATE_STAMP_MONTH}${KWSYS_DATE_STAMP_DAY}"
- )
-
INCLUDE(${CMake_SOURCE_DIR}/Source/CMakeVersionSource.cmake)
ENDIF()