From 41747da931a4bd734bf2ea16550bb956a3cbcfc4 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 7 Apr 2012 23:16:04 +0200 Subject: [PATCH] Changed: Remove cariage return in build date --- code/CMakeModules/GetRevision.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/CMakeModules/GetRevision.cmake b/code/CMakeModules/GetRevision.cmake index bc48235af..d38215aba 100644 --- a/code/CMakeModules/GetRevision.cmake +++ b/code/CMakeModules/GetRevision.cmake @@ -20,13 +20,13 @@ ENDIF(NOT SOURCE_DIR AND ROOT_DIR) MACRO(NOW RESULT) 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") 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") ELSEIF(UNIX) - 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}") + EXECUTE_PROCESS(COMMAND "date" "+%Y-%m-%d %H:%M:%S" OUTPUT_VARIABLE DATETIME) + STRING(REGEX REPLACE "([0-9: -]+).*" "\\1" ${RESULT} "${DATETIME}") ELSE (WIN32) MESSAGE(SEND_ERROR "date not implemented") SET(${RESULT} "0000-00-00 00:00:00")