summaryrefslogtreecommitdiffstats
path: root/Source/CMakeVersion.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-25 13:15:18 (GMT)
committerBrad King <brad.king@kitware.com>2019-07-29 15:25:44 (GMT)
commit0505a66cbf6c42ffa3592c9866c5772e7806f5fc (patch)
tree26263b4d902cc18c4a4ce40b57a15b19f1eac316 /Source/CMakeVersion.cmake
parentf7bf08754be661e936d1131b91ca48616cdb9044 (diff)
downloadCMake-0505a66cbf6c42ffa3592c9866c5772e7806f5fc.zip
CMake-0505a66cbf6c42ffa3592c9866c5772e7806f5fc.tar.gz
CMake-0505a66cbf6c42ffa3592c9866c5772e7806f5fc.tar.bz2
CMakeVersion: Add generic '-git' suffix when no git info is available
Diffstat (limited to 'Source/CMakeVersion.cmake')
-rw-r--r--Source/CMakeVersion.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index c576a24..32a40f9 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -60,6 +60,12 @@ if(git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]
set(CMake_VERSION_IS_DIRTY 1)
endif()
endif()
+else()
+ # No commit information.
+ if(NOT CMake_VERSION_IS_RELEASE)
+ # Generic development version.
+ set(CMake_VERSION "${CMake_VERSION}-git")
+ endif()
endif()
# Extract the version suffix component.