19 lines
625 B
CMake
19 lines
625 B
CMake
|
if(NOT MYX_CMAKE_TODAY)
|
||
|
if(WIN32)
|
||
|
execute_process(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE MYX_CMAKE_TODAY)
|
||
|
else()
|
||
|
execute_process(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE MYX_CMAKE_TODAY)
|
||
|
endif()
|
||
|
string(REGEX REPLACE "(..)/(..)/(....).*" "\\3-\\2-\\1" MYX_CMAKE_TODAY ${MYX_CMAKE_TODAY})
|
||
|
endif()
|
||
|
|
||
|
if(NOT MYX_CMAKE_YEAR)
|
||
|
if(WIN32)
|
||
|
execute_process(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE MYX_CMAKE_YEAR)
|
||
|
else()
|
||
|
execute_process(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE MYX_CMAKE_YEAR)
|
||
|
endif()
|
||
|
string(REGEX REPLACE "(..)/(..)/(....).*" "\\3" MYX_CMAKE_YEAR ${MYX_CMAKE_YEAR})
|
||
|
endif()
|
||
|
|