mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 00:11:07 -06:00
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>
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user