summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
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 /CMakeLists.txt
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 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 3 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 03a0e58..d48bda2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -361,11 +361,11 @@ SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 7)
SET(CMake_VERSION_PATCH 0)
-# CVS versions are odd, if this is an odd minor version
-# then set the CMake_VERSION_DATE variable
+# We use odd minor numbers for development versions.
+# Use a date for the development patch level.
IF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
INCLUDE(${CMake_SOURCE_DIR}/Source/kwsys/kwsysDateStamp.cmake)
- SET(CMake_VERSION_DATE
+ SET(CMake_VERSION_PATCH
"${KWSYS_DATE_STAMP_YEAR}${KWSYS_DATE_STAMP_MONTH}${KWSYS_DATE_STAMP_DAY}"
)
ENDIF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
@@ -425,10 +425,6 @@ IF(BUILD_QtDialog)
IF(APPLE)
SET(CMAKE_BUNDLE_NAME
"CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}-${CMake_VERSION_PATCH}")
- IF(CMake_VERSION_DATE)
- SET(CMAKE_BUNDLE_NAME
- "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}-${CMake_VERSION_DATE}")
- ENDIF(CMake_VERSION_DATE)
SET(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}")
# make sure CMAKE_INSTALL_PREFIX ends in /
STRING(LENGTH "${CMAKE_INSTALL_PREFIX}" LEN)