BUG: Fixed construction of CMake_VERSION_DATE to use KWSys DateStamp feature now that cmVersion.cxx is not updated nightly anymore.
This commit is contained in:
parent
d1ad16f438
commit
70adbcee0d
|
@ -349,15 +349,10 @@ SET(CMake_VERSION_PATCH 0)
|
||||||
# CVS versions are odd, if this is an odd minor version
|
# CVS versions are odd, if this is an odd minor version
|
||||||
# then set the CMake_VERSION_DATE variable
|
# then set the CMake_VERSION_DATE variable
|
||||||
IF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
|
IF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
|
||||||
# extract the version Date from the cmVersion.cxx file
|
INCLUDE(${CMake_SOURCE_DIR}/Source/kwsys/kwsysDateStamp.cmake)
|
||||||
FILE(READ "${CMake_SOURCE_DIR}/Source/cmVersion.cxx"
|
SET(CMake_VERSION_DATE
|
||||||
CMAKE_VERSION_FILE_CONTENT)
|
"${KWSYS_DATE_STAMP_YEAR}${KWSYS_DATE_STAMP_MONTH}${KWSYS_DATE_STAMP_DAY}"
|
||||||
STRING(REGEX MATCH "\\$Date: ([^ ]*) "
|
)
|
||||||
CMake_VERSION_DATE "${CMAKE_VERSION_FILE_CONTENT}")
|
|
||||||
STRING(REGEX REPLACE "\\$Date: ([^ ]*) " "\\1"
|
|
||||||
CMake_VERSION_DATE "${CMake_VERSION_DATE}")
|
|
||||||
STRING(REPLACE "/" "" CMake_VERSION_DATE
|
|
||||||
"${CMake_VERSION_DATE}")
|
|
||||||
ENDIF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
|
ENDIF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
|
||||||
|
|
||||||
SET(CMake_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
|
SET(CMake_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
|
||||||
|
|
Loading…
Reference in New Issue