mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-14 05:04:50 +00:00
Fixed: Use STRING(TIMESTAMP ...) since CMake 2.8.11 to get build time
This commit is contained in:
parent
f14dbd4b65
commit
d9d599e94f
1 changed files with 14 additions and 10 deletions
|
@ -24,7 +24,10 @@ ELSE()
|
|||
ENDIF()
|
||||
|
||||
MACRO(NOW RESULT)
|
||||
IF (WIN32)
|
||||
IF(CMAKE_VERSION VERSION_GREATER "2.8.10")
|
||||
STRING(TIMESTAMP ${RESULT} "%Y-%m-%d %H:%M:%S")
|
||||
ELSE()
|
||||
IF(WIN32)
|
||||
EXECUTE_PROCESS(COMMAND "wmic" "os" "get" "localdatetime" OUTPUT_VARIABLE DATETIME)
|
||||
IF(NOT DATETIME MATCHES "ERROR")
|
||||
STRING(REGEX REPLACE ".*\n([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9]).*" "\\1-\\2-\\3 \\4:\\5:\\6" ${RESULT} "${DATETIME}")
|
||||
|
@ -36,6 +39,7 @@ MACRO(NOW RESULT)
|
|||
MESSAGE(SEND_ERROR "date not implemented")
|
||||
SET(${RESULT} "0000-00-00 00:00:00")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
IF(EXISTS "${ROOT_DIR}/.svn/")
|
||||
|
|
Loading…
Reference in a new issue