cmlib/CMLibToday.cmake

13 lines
328 B
CMake
Raw Normal View History

2019-02-12 16:31:17 +00:00
if(NOT TODAY)
if(WIN32)
execute_process(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE TODAY)
else()
execute_process(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE TODAY)
endif()
string(REGEX
REPLACE "(..)/(..)/(....).*"
"\\3-\\2-\\1"
TODAY
${TODAY})
2019-02-12 16:31:17 +00:00
endif()