summaryrefslogtreecommitdiffstats
path: root/Source/CMakeVersionCompute.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-26 12:04:58 (GMT)
committerBrad King <brad.king@kitware.com>2019-07-26 12:08:30 (GMT)
commiteb5ea5a505378e02df4d7e142d174b8917a3ef14 (patch)
tree5d21f18657e473080bd6b10ecc5a2dae37ff473e /Source/CMakeVersionCompute.cmake
parentd9156c387c60bc15523a27bba83809ec9fa2a8bf (diff)
downloadCMake-eb5ea5a505378e02df4d7e142d174b8917a3ef14.zip
CMake-eb5ea5a505378e02df4d7e142d174b8917a3ef14.tar.gz
CMake-eb5ea5a505378e02df4d7e142d174b8917a3ef14.tar.bz2
CMakeVersion: Use '-rc0' version suffix on release branches prior to rc1
Revert the change from commit 7b354baad5 (CMakeVersion: Set CMake_VERSION_RC to 0 even in non-rc versions, 2019-07-25) and instead define a `0` value in `CMake_VERSION_RC` to mean `-rc0`. This distinguishes release branch versions prior to the first release candidate from the first release candidate itself. It also makes room for a dedicated "CMake $major.$minor.0-rc1" release commit for `-rc1` as we have for later release candidates and final releases.
Diffstat (limited to 'Source/CMakeVersionCompute.cmake')
-rw-r--r--Source/CMakeVersionCompute.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CMakeVersionCompute.cmake b/Source/CMakeVersionCompute.cmake
index 72a5800..160f470 100644
--- a/Source/CMakeVersionCompute.cmake
+++ b/Source/CMakeVersionCompute.cmake
@@ -16,7 +16,7 @@ endif()
set(CMake_VERSION ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH})
if(CMake_VERSION_SOURCE)
set(CMake_VERSION_SUFFIX "${CMake_VERSION_SOURCE}")
-elseif(CMake_VERSION_RC)
+elseif(DEFINED CMake_VERSION_RC)
set(CMake_VERSION_SUFFIX "rc${CMake_VERSION_RC}")
else()
set(CMake_VERSION_SUFFIX "")