CMakeVersion: Add generic '-git' suffix when no git info is available

This commit is contained in:
Brad King
2019-07-25 09:15:18 -04:00
parent f7bf08754b
commit 0505a66cbf

View File

@@ -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.