Merge topic 'version-cleanups'

aec06dd4 Version: Always define CMake_VERSION_IS_DIRTY to 0 or 1
ef13efab Version: Remove check for existence of CVS repository
This commit is contained in:
Brad King 2016-08-24 09:45:33 -04:00 committed by CMake Topic Stage
commit 2986ca5ecc
2 changed files with 1 additions and 9 deletions

View File

@ -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()

View File

@ -24,16 +24,7 @@ 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()
elseif(EXISTS ${CMake_SOURCE_DIR}/CVS/Repository)
file(READ ${CMake_SOURCE_DIR}/CVS/Repository repo)
set(branch "")
if("${repo}" MATCHES "\\.git/([^\r\n]*)")
set(branch "${CMAKE_MATCH_1}")
endif()
set(CMake_VERSION_SOURCE "cvs${branch}")
endif()