diff options
-rw-r--r-- | CMakeCPackOptions.cmake.in | 10 | ||||
-rw-r--r-- | Help/release/3.0.0.rst | 5 | ||||
-rw-r--r-- | Help/variable/CMAKE_TWEAK_VERSION.rst | 10 | ||||
-rw-r--r-- | Help/variable/CMAKE_VERSION.rst | 19 | ||||
-rw-r--r-- | Source/CMakeInstallDestinations.cmake | 8 | ||||
-rwxr-xr-x | Source/CMakeVersion.bash | 2 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 1 | ||||
-rw-r--r-- | Source/CMakeVersionCompute.cmake | 7 | ||||
-rw-r--r-- | Source/cmExportFileGenerator.h | 13 | ||||
-rw-r--r-- | Source/cmVersion.cxx | 2 | ||||
-rw-r--r-- | Source/cmVersionConfig.h.in | 1 | ||||
-rw-r--r-- | Source/cmVersionMacros.h | 4 | ||||
-rwxr-xr-x | bootstrap | 5 |
13 files changed, 45 insertions, 42 deletions
diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index 3ff0188..aba404f 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() diff --git a/Help/release/3.0.0.rst b/Help/release/3.0.0.rst index 105d651..208e92a 100644 --- a/Help/release/3.0.0.rst +++ b/Help/release/3.0.0.rst @@ -390,6 +390,11 @@ Deprecated and Removed Features Other Changes ============= +* The version scheme was changed to use only two components for + the feature level instead of three. The third component will + now be used for bug-fix releases or the date of development versions. + See the :variable:`CMAKE_VERSION` variable documentation for details. + * The default install locations of CMake itself on Windows and OS X no longer contain the CMake version number. This allows for easy replacement without re-generating local build trees diff --git a/Help/variable/CMAKE_TWEAK_VERSION.rst b/Help/variable/CMAKE_TWEAK_VERSION.rst index a2c8f35..be2e050 100644 --- a/Help/variable/CMAKE_TWEAK_VERSION.rst +++ b/Help/variable/CMAKE_TWEAK_VERSION.rst @@ -1,5 +1,11 @@ CMAKE_TWEAK_VERSION ------------------- -Fourth version number component of the :variable:`CMAKE_VERSION` -variable. +Defined to ``0`` for compatibility with code written for older +CMake versions that may have defined higher values. + +.. note:: + + In CMake versions 2.8.2 through 2.8.12, this variable holds + the fourth version number component of the + :variable:`CMAKE_VERSION` variable. diff --git a/Help/variable/CMAKE_VERSION.rst b/Help/variable/CMAKE_VERSION.rst index 6184f08..bbb1d91 100644 --- a/Help/variable/CMAKE_VERSION.rst +++ b/Help/variable/CMAKE_VERSION.rst @@ -1,24 +1,23 @@ CMAKE_VERSION ------------- -The CMake version string as up to four non-negative integer components +The CMake version string as three non-negative integer components separated by ``.`` and possibly followed by ``-`` and other information. -The first three components represent the feature level and the fourth +The first two components represent the feature level and the third component represents either a bug-fix level or development date. Release versions and release candidate versions of CMake use the format:: - <major>.<minor>.<patch>[.<tweak>][-rc<n>] + <major>.<minor>.<patch>[-rc<n>] -where the ``<tweak>`` component is less than ``20000000``. Development +where the ``<patch>`` component is less than ``20000000``. Development versions of CMake use the format:: - <major>.<minor>.<patch>.<date>[-<id>] + <major>.<minor>.<date>[-<id>] where the ``<date>`` component is of format ``CCYYMMDD`` and ``<id>`` may contain arbitrary text. This represents development as of a -particular date following the ``<major>.<minor>.<patch>`` feature -release. +particular date following the ``<major>.<minor>`` feature release. Individual component values are also available in variables: @@ -35,6 +34,12 @@ strings as floating-point numbers. .. note:: + CMake versions 2.8.2 through 2.8.12 used three components for the + feature level. Release versions represented the bug-fix level in a + fourth component, i.e. ``<major>.<minor>.<patch>[.<tweak>][-rc<n>]``. + Development versions represented the development date in the fourth + component, i.e. ``<major>.<minor>.<patch>.<date>[-<id>]``. + CMake versions prior to 2.8.2 used three components for the feature level and had no bug-fix component. Release versions used an even-valued second component, i.e. diff --git a/Source/CMakeInstallDestinations.cmake b/Source/CMakeInstallDestinations.cmake index 3e93d41..99c86ca 100644 --- a/Source/CMakeInstallDestinations.cmake +++ b/Source/CMakeInstallDestinations.cmake @@ -1,15 +1,15 @@ # Keep formatting here consistent with bootstrap script expectations. if(BEOS) - set(CMAKE_DATA_DIR_DEFAULT "share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}") # HAIKU + set(CMAKE_DATA_DIR_DEFAULT "share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # HAIKU set(CMAKE_MAN_DIR_DEFAULT "documentation/man") # HAIKU - set(CMAKE_DOC_DIR_DEFAULT "documentation/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}") # HAIKU + set(CMAKE_DOC_DIR_DEFAULT "documentation/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # HAIKU elseif(CYGWIN) set(CMAKE_DATA_DIR_DEFAULT "share/cmake-${CMake_VERSION}") # CYGWIN set(CMAKE_DOC_DIR_DEFAULT "share/doc/cmake-${CMake_VERSION}") # CYGWIN set(CMAKE_MAN_DIR_DEFAULT "share/man") # CYGWIN else() - set(CMAKE_DATA_DIR_DEFAULT "share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}") # OTHER - set(CMAKE_DOC_DIR_DEFAULT "doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}") # OTHER + set(CMAKE_DATA_DIR_DEFAULT "share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # OTHER + set(CMAKE_DOC_DIR_DEFAULT "doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # OTHER set(CMAKE_MAN_DIR_DEFAULT "man") # OTHER endif() diff --git a/Source/CMakeVersion.bash b/Source/CMakeVersion.bash index 4794e60..853b0ca 100755 --- a/Source/CMakeVersion.bash +++ b/Source/CMakeVersion.bash @@ -3,5 +3,5 @@ if test "x$1" = "x-f"; then shift ; n='*' ; else n='\{8\}' ; fi if test "$#" -gt 0; then echo 1>&2 "usage: CMakeVersion.bash [-f]"; exit 1; fi sed -i -e ' -s/\(^set(CMake_VERSION_TWEAK\) [0-9]'"$n"'\(.*\)/\1 '"$(date +%Y%m%d)"'\2/ +s/\(^set(CMake_VERSION_PATCH\) [0-9]'"$n"'\(.*\)/\1 '"$(date +%Y%m%d)"'\2/ ' "${BASH_SOURCE%/*}/CMakeVersion.cmake" diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 547aca8..5ce43f5 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,5 +2,4 @@ set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 0) set(CMake_VERSION_PATCH 0) -set(CMake_VERSION_TWEAK 0) set(CMake_VERSION_RC 1) diff --git a/Source/CMakeVersionCompute.cmake b/Source/CMakeVersionCompute.cmake index a166334..496d6cf 100644 --- a/Source/CMakeVersionCompute.cmake +++ b/Source/CMakeVersionCompute.cmake @@ -1,8 +1,8 @@ # Load version number components. include(${CMake_SOURCE_DIR}/Source/CMakeVersion.cmake) -# Releases define a small tweak level. -if("${CMake_VERSION_TWEAK}" VERSION_LESS 20000000) +# Releases define a small patch level. +if("${CMake_VERSION_PATCH}" VERSION_LESS 20000000) set(CMake_VERSION_IS_RELEASE 1) set(CMake_VERSION_SOURCE "") else() @@ -12,9 +12,6 @@ endif() # Compute the full version string. set(CMake_VERSION ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}) -if(${CMake_VERSION_TWEAK} GREATER 0) - set(CMake_VERSION ${CMake_VERSION}.${CMake_VERSION_TWEAK}) -endif() if(CMake_VERSION_RC) set(CMake_VERSION ${CMake_VERSION}-rc${CMake_VERSION_RC}) endif() diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index 8be4bbf..57ab378 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -21,14 +21,13 @@ #define STRINGIFY_HELPER(X) #X #define STRINGIFY(X) STRINGIFY_HELPER(X) -#define DEVEL_CMAKE_VERSION(maj, min, patch) \ - (CMake_VERSION_ENCODE(maj, min, patch) > \ - CMake_VERSION_ENCODE(CMake_VERSION_MAJOR, CMake_VERSION_MINOR, \ - CMake_VERSION_PATCH) \ - ) ? \ +#define DEVEL_CMAKE_VERSION(major, minor) ( \ + CMake_VERSION_ENCODE(major, minor, 0) > \ + CMake_VERSION_ENCODE(CMake_VERSION_MAJOR, CMake_VERSION_MINOR, 0) ? \ STRINGIFY(CMake_VERSION_MAJOR) "." STRINGIFY(CMake_VERSION_MINOR) "." \ - STRINGIFY(CMake_VERSION_PATCH) "." STRINGIFY(CMake_VERSION_TWEAK) \ - : #maj "." #min "." #patch + STRINGIFY(CMake_VERSION_PATCH) \ + : #major "." #minor ".0" \ + ) class cmTargetExport; diff --git a/Source/cmVersion.cxx b/Source/cmVersion.cxx index 047d24d..9cb0cd6 100644 --- a/Source/cmVersion.cxx +++ b/Source/cmVersion.cxx @@ -16,7 +16,7 @@ unsigned int cmVersion::GetMajorVersion() { return CMake_VERSION_MAJOR; } unsigned int cmVersion::GetMinorVersion() { return CMake_VERSION_MINOR; } unsigned int cmVersion::GetPatchVersion() { return CMake_VERSION_PATCH; } -unsigned int cmVersion::GetTweakVersion() { return CMake_VERSION_TWEAK; } +unsigned int cmVersion::GetTweakVersion() { return 0; } const char* cmVersion::GetCMakeVersion() { diff --git a/Source/cmVersionConfig.h.in b/Source/cmVersionConfig.h.in index 76bc8fe..16aeabe 100644 --- a/Source/cmVersionConfig.h.in +++ b/Source/cmVersionConfig.h.in @@ -12,5 +12,4 @@ #define CMake_VERSION_MAJOR @CMake_VERSION_MAJOR@ #define CMake_VERSION_MINOR @CMake_VERSION_MINOR@ #define CMake_VERSION_PATCH @CMake_VERSION_PATCH@ -#define CMake_VERSION_TWEAK @CMake_VERSION_TWEAK@ #define CMake_VERSION "@CMake_VERSION@" diff --git a/Source/cmVersionMacros.h b/Source/cmVersionMacros.h index 67f58ca..cf7f678 100644 --- a/Source/cmVersionMacros.h +++ b/Source/cmVersionMacros.h @@ -14,8 +14,8 @@ #include "cmVersionConfig.h" -#define CMake_VERSION_TWEAK_IS_RELEASE(tweak) ((tweak) < 20000000) -#if CMake_VERSION_TWEAK_IS_RELEASE(CMake_VERSION_TWEAK) +#define CMake_VERSION_PATCH_IS_RELEASE(patch) ((patch) < 20000000) +#if CMake_VERSION_PATCH_IS_RELEASE(CMake_VERSION_PATCH) # define CMake_VERSION_IS_RELEASE 1 #endif @@ -53,10 +53,6 @@ cmake_version_major="`cmake_version_component MAJOR`" cmake_version_minor="`cmake_version_component MINOR`" cmake_version_patch="`cmake_version_component PATCH`" cmake_version="${cmake_version_major}.${cmake_version_minor}.${cmake_version_patch}" -cmake_version_tweak="`cmake_version_component TWEAK`" -if [ "$cmake_version_tweak" != "0" ]; then - cmake_version="${cmake_version}.${cmake_version_tweak}" -fi cmake_version_rc="`cmake_version_component RC`" if [ "$cmake_version_rc" != "" ]; then cmake_version="${cmake_version}-rc${cmake_version_rc}" @@ -1464,7 +1460,6 @@ fi cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_MAJOR ${cmake_version_major}" cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_MINOR ${cmake_version_minor}" cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_PATCH ${cmake_version_patch}" -cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_TWEAK ${cmake_version_tweak}" cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION \"${cmake_version}\"" cmake_report cmConfigure.h${_tmp} "#define CMAKE_ROOT_DIR \"${cmake_root_dir}\"" cmake_report cmConfigure.h${_tmp} "#define CMAKE_DATA_DIR \"/bootstrap-not-insalled\"" |