summaryrefslogtreecommitdiff
path: root/CMakeCPackOptions.cmake.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-02-19 09:15:42 -0500
committerBrad King <brad.king@kitware.com>2014-02-19 09:30:13 -0500
commit7cbab178718de26575fe98144e7e388b2f6735a6 (patch)
tree98e1e191a8687646dae44bd508f9b6f02d097666 /CMakeCPackOptions.cmake.in
parent4bb80396e09882dcb8bc0feb10de88351eb55e68 (diff)
downloadcmake-7cbab178718de26575fe98144e7e388b2f6735a6.tar.gz
Change version scheme to use only two components for feature levels
Historically CMake used three version components for the feature level. We released new features while incrementing only the third version component. Since commit v2.8.2~105^2~4 (New version scheme to support branchy workflow, 2010-04-23) we used the fourth version component for bug-fix releases and the development date: <major>.<minor>.<patch>[.<tweak>][-rc<n>] = Release <major>.<minor>.<patch>.<date>[-<id>] = Development This solidified use of three components for the feature level, and was necessary to continue releasing 2.x versions because: * Some existing projects performed floating-point comparisons of ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} to 2.x numbers so ``x`` could never be higher than 9. * Version 2.9.<date> was used briefly in post-2.8.0 development in CVS prior to the transition to Git, so using it in releases may have caused confusion. Now that we are moving to 3.x versions, these two restrictions go away. Therefore we now change to use only two components for the feature level and use the scheme: <major>.<minor>.<patch>[-rc<n>] = Release <major>.<minor>.<date>[-<id>] = Development
Diffstat (limited to 'CMakeCPackOptions.cmake.in')
-rw-r--r--CMakeCPackOptions.cmake.in10
1 files changed, 4 insertions, 6 deletions
diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in
index 3ff0188373..aba404f091 100644
--- a/CMakeCPackOptions.cmake.in
+++ b/CMakeCPackOptions.cmake.in
@@ -58,13 +58,11 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX")
endif()
set(CPACK_PACKAGE_VERSION
- "@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@.@CMake_VERSION_PATCH@")
+ "@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@")
# WIX installers require at most a 4 component version number, where
# each component is an integer between 0 and 65534 inclusive
- set(tweak "@CMake_VERSION_TWEAK@")
- if(tweak MATCHES "^[0-9]+$")
- if(tweak GREATER 0 AND tweak LESS 65535)
- set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}.${tweak}")
- endif()
+ set(patch "@CMake_VERSION_PATCH@")
+ if(patch MATCHES "^[0-9]+$" AND patch LESS 65535)
+ set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}.${patch}")
endif()
endif()