mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-19 21:56:13 +00:00
Changed: Remove cariage return in build date
This commit is contained in:
parent
0aea68b1b2
commit
c4866c172b
1 changed files with 3 additions and 3 deletions
|
@ -20,13 +20,13 @@ ENDIF(NOT SOURCE_DIR AND ROOT_DIR)
|
||||||
|
|
||||||
MACRO(NOW RESULT)
|
MACRO(NOW RESULT)
|
||||||
IF (WIN32)
|
IF (WIN32)
|
||||||
EXECUTE_PROCESS(COMMAND "wmic os get localdatetime" OUTPUT_VARIABLE DATETIME)
|
EXECUTE_PROCESS(COMMAND "wmic" "os" "get" "localdatetime" OUTPUT_VARIABLE DATETIME)
|
||||||
IF(NOT DATETIME MATCHES "ERROR")
|
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}")
|
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}")
|
||||||
ENDIF(NOT DATETIME MATCHES "ERROR")
|
ENDIF(NOT DATETIME MATCHES "ERROR")
|
||||||
ELSEIF(UNIX)
|
ELSEIF(UNIX)
|
||||||
EXECUTE_PROCESS(COMMAND "date +'%Y-%m-%d %H:%M:%S'" OUTPUT_VARIABLE DATETIME)
|
EXECUTE_PROCESS(COMMAND "date" "+%Y-%m-%d %H:%M:%S" OUTPUT_VARIABLE DATETIME)
|
||||||
STRING(REGEX REPLACE "([0-9]+)-([0-9]+)-([0-9]+) ([0-9]+):([0-9]+):([0-9]+).*" "\\1-\\2-\\3 \\4:\\5:\\6" ${RESULT} "${DATETIME}")
|
STRING(REGEX REPLACE "([0-9: -]+).*" "\\1" ${RESULT} "${DATETIME}")
|
||||||
ELSE (WIN32)
|
ELSE (WIN32)
|
||||||
MESSAGE(SEND_ERROR "date not implemented")
|
MESSAGE(SEND_ERROR "date not implemented")
|
||||||
SET(${RESULT} "0000-00-00 00:00:00")
|
SET(${RESULT} "0000-00-00 00:00:00")
|
||||||
|
|
Loading…
Reference in a new issue