summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-08-23 13:09:03 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-23 13:11:57 (GMT)
commitaec06dd4922187ce5346d20a9f0d53f01b6ce9fc (patch)
tree47cc2f71543b093be1c4009f8deb3c763a68e6d3 /Source
parentef13efab56464890f171c2a2142b64b728f4f2e8 (diff)
downloadCMake-aec06dd4922187ce5346d20a9f0d53f01b6ce9fc.zip
CMake-aec06dd4922187ce5346d20a9f0d53f01b6ce9fc.tar.gz
CMake-aec06dd4922187ce5346d20a9f0d53f01b6ce9fc.tar.bz2
Version: Always define CMake_VERSION_IS_DIRTY to 0 or 1
In cmVersionConfig.h we must define this macro with a value because clients expect it to have one. Also ensure that all CMakeLists.txt code paths have an initialized value. Reported-by: Stephen Kelly <steveire@gmail.com>
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersionCompute.cmake1
-rw-r--r--Source/CMakeVersionSource.cmake2
2 files changed, 1 insertions, 2 deletions
diff --git a/Source/CMakeVersionCompute.cmake b/Source/CMakeVersionCompute.cmake
index 3bdcfd6..d9218d7 100644
--- a/Source/CMakeVersionCompute.cmake
+++ b/Source/CMakeVersionCompute.cmake
@@ -7,6 +7,7 @@ if("${CMake_VERSION_PATCH}" VERSION_LESS 20000000)
set(CMake_VERSION_IS_RELEASE 1)
set(CMake_VERSION_SOURCE "")
else()
+ set(CMake_VERSION_IS_DIRTY 0) # may be set to 1 by CMakeVersionSource
set(CMake_VERSION_IS_RELEASE 0)
include(${CMake_SOURCE_DIR}/Source/CMakeVersionSource.cmake)
endif()
diff --git a/Source/CMakeVersionSource.cmake b/Source/CMakeVersionSource.cmake
index 4f22ded..5ea1de3 100644
--- a/Source/CMakeVersionSource.cmake
+++ b/Source/CMakeVersionSource.cmake
@@ -24,8 +24,6 @@ if(EXISTS ${CMake_SOURCE_DIR}/.git/HEAD)
)
if(dirty)
set(CMake_VERSION_IS_DIRTY 1)
- else()
- set(CMake_VERSION_IS_DIRTY 0)
endif()
endif()
endif()