summaryrefslogtreecommitdiff
path: root/CMakeCPack.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-03-05 15:17:07 -0500
committerBrad King <brad.king@kitware.com>2009-03-05 15:17:07 -0500
commit98c51ff6dcd5e6aa80050cfc00f19eb6092e79c0 (patch)
tree8aabdbd5936493a3808cf1184620ebf08ef1d8ff /CMakeCPack.cmake
parent83f39ba41b2c8969db2b44761d5fed363dc170b5 (diff)
downloadcmake-98c51ff6dcd5e6aa80050cfc00f19eb6092e79c0.tar.gz
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 'CMakeCPack.cmake')
-rw-r--r--CMakeCPack.cmake13
1 files changed, 4 insertions, 9 deletions
diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake
index ec4cb9964f..51715cc509 100644
--- a/CMakeCPack.cmake
+++ b/CMakeCPack.cmake
@@ -18,18 +18,13 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
SET(CPACK_PACKAGE_VERSION_MAJOR "${CMake_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${CMake_VERSION_MINOR}")
-# if version date is set then use that as the patch
- IF(CMake_VERSION_DATE)
- SET(CPACK_PACKAGE_VERSION_PATCH "${CMake_VERSION_DATE}")
- ELSE(CMake_VERSION_DATE)
- SET(CPACK_PACKAGE_VERSION_PATCH "${CMake_VERSION_PATCH}")
- ENDIF(CMake_VERSION_DATE)
+ SET(CPACK_PACKAGE_VERSION_PATCH "${CMake_VERSION_PATCH}")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME
- "cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+ "cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
IF(CMake_VERSION_RC)
SET(CPACK_SOURCE_PACKAGE_FILE_NAME
- "${CPACK_SOURCE_PACKAGE_FILE_NAME}-RC-${CMake_VERSION_RC}")
+ "${CPACK_SOURCE_PACKAGE_FILE_NAME}-rc${CMake_VERSION_RC}")
ENDIF(CMake_VERSION_RC)
IF(NOT DEFINED CPACK_SYSTEM_NAME)
# make sure package is not Cygwin-unknown, for Cygwin just
@@ -82,7 +77,7 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
SET(CPACK_PACKAGE_NAME cmake)
# setup the name of the package for cygwin cmake-2.4.3
SET(CPACK_PACKAGE_FILE_NAME
- "${CPACK_PACKAGE_NAME}-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+ "${CPACK_PACKAGE_NAME}-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
# the source has the same name as the binary
SET(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME})
# Create a cygwin version number in case there are changes for cygwin