From db5ba410bf8caaf75634f4afa178473296161f3f Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Mon, 28 Jan 2013 20:05:34 +0100 Subject: [PATCH] Fixed cmake cross compile timestamp creating. We only need to distinct "Windows" from unix like systems https://bugs.freedesktop.org/show_bug.cgi?id=59733 --- cmake/modules/Macros.cmake | 9 +++------ 1 Datei geändert, 3 Zeilen hinzugefügt(+), 6 Zeilen entfernt(-) diff --git a/cmake/modules/Macros.cmake b/cmake/modules/Macros.cmake index b637156..adb34b5 100644 --- a/cmake/modules/Macros.cmake +++ b/cmake/modules/Macros.cmake @@ -1,15 +1,12 @@ MACRO(TIMESTAMP RESULT) - IF(WIN32) + if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") EXECUTE_PROCESS(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE DATE) string(REGEX REPLACE "(..)[/.](..)[/.](....).*" "\\3\\2\\1" DATE ${DATE}) EXECUTE_PROCESS(COMMAND "cmd" " /C time /T" OUTPUT_VARIABLE TIME) string(REGEX REPLACE "(..):(..)" "\\1\\2" TIME ${TIME}) set (${RESULT} "${DATE}${TIME}") - ELSEIF(UNIX) + else () EXECUTE_PROCESS(COMMAND "date" "+%Y%m%d%H%M" OUTPUT_VARIABLE ${RESULT}) - ELSE() - MESSAGE(SEND_ERROR "date not implemented") - SET(${RESULT} 000000000000) - ENDIF() + endif () ENDMACRO() -- 1.7.10.4