summaryrefslogtreecommitdiffstats
path: root/Source/CMakeVersion.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-25 12:39:38 (GMT)
committerBrad King <brad.king@kitware.com>2019-07-29 15:25:44 (GMT)
commit311f232f7a045cd781171c2660ef005fb8074e3d (patch)
treee51375d1eca0e70d8f0ad237f90048c585b62e0e /Source/CMakeVersion.cmake
parent2f608566b4d19192df2d2213d570692075504b29 (diff)
downloadCMake-311f232f7a045cd781171c2660ef005fb8074e3d.zip
CMake-311f232f7a045cd781171c2660ef005fb8074e3d.tar.gz
CMake-311f232f7a045cd781171c2660ef005fb8074e3d.tar.bz2
CMakeVersion: De-duplicate variable initialization
Diffstat (limited to 'Source/CMakeVersion.cmake')
-rw-r--r--Source/CMakeVersion.cmake6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index abfacad..d3e734c 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -3,6 +3,8 @@ set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 15)
set(CMake_VERSION_PATCH 20190726)
#set(CMake_VERSION_RC 0)
+set(CMake_VERSION_IS_DIRTY 0)
+set(CMake_VERSION_SOURCE "")
if(EXISTS ${CMake_SOURCE_DIR}/.git)
find_package(Git QUIET)
@@ -21,14 +23,10 @@ endif()
# Releases define a small patch level.
if("${CMake_VERSION_PATCH}" VERSION_LESS 20000000)
- set(CMake_VERSION_IS_DIRTY 0)
set(CMake_VERSION_IS_RELEASE 1)
- set(CMake_VERSION_SOURCE "")
else()
- set(CMake_VERSION_IS_DIRTY 0)
set(CMake_VERSION_IS_RELEASE 0)
# Try to identify the current development source version.
- set(CMake_VERSION_SOURCE "")
if(COMMAND _git)
_git(rev-parse --verify -q --short=4 HEAD)
if(_git_out)