diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index 4ca5ad9b4..689626b2d 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -2,6 +2,7 @@ macro(today RESULT) if(WIN32) execute_process(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE ${RESULT}) string(REGEX REPLACE "(..)/(..)/(....).*" "\\1.\\2.\\3" ${RESULT} ${${RESULT}}) + string(SUBSTRING ${${RESULT}} 0 10 ${RESULT}) elseif(UNIX) execute_process(COMMAND "date" "+%Y-%m-%d" OUTPUT_VARIABLE ${RESULT}) string(REGEX REPLACE "(....)-(..)-(..).*" "\\1-\\2-\\3" ${RESULT} ${${RESULT}})