From ef13efab56464890f171c2a2142b64b728f4f2e8 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 22 Aug 2016 23:46:01 +0200 Subject: [PATCH 1/2] Version: Remove check for existence of CVS repository --- Source/CMakeVersionSource.cmake | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Source/CMakeVersionSource.cmake b/Source/CMakeVersionSource.cmake index bc5975e57..4f22ded7a 100644 --- a/Source/CMakeVersionSource.cmake +++ b/Source/CMakeVersionSource.cmake @@ -29,11 +29,4 @@ if(EXISTS ${CMake_SOURCE_DIR}/.git/HEAD) 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() From aec06dd4922187ce5346d20a9f0d53f01b6ce9fc Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 23 Aug 2016 09:09:03 -0400 Subject: [PATCH 2/2] 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 --- Source/CMakeVersionCompute.cmake | 1 + Source/CMakeVersionSource.cmake | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/CMakeVersionCompute.cmake b/Source/CMakeVersionCompute.cmake index 3bdcfd6f9..d9218d731 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 4f22ded7a..5ea1de3f4 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()