mirror of
https://github.com/opentx/opentx.git
synced 2025-07-13 11:29:51 +03:00
[build][Windows] Fix date parsing regex for varying locales.
This commit is contained in:
parent
5e63bbcd83
commit
d5476af719
1 changed files with 1 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
macro(today RESULT)
|
macro(today RESULT)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
execute_process(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE ${RESULT})
|
execute_process(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE ${RESULT})
|
||||||
string(REGEX REPLACE "[^0-9]*([0-9]+)/([0-9]+)/([0-9]+).*" "\\1-\\2-\\3" ${RESULT} ${${RESULT}})
|
string(REGEX REPLACE "[^0-9]*([0-9]+)[^0-9]([0-9]+)[^0-9]([0-9]+).*" "\\1-\\2-\\3" ${RESULT} ${${RESULT}})
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
execute_process(COMMAND "date" "+%Y-%m-%d" OUTPUT_VARIABLE ${RESULT})
|
execute_process(COMMAND "date" "+%Y-%m-%d" OUTPUT_VARIABLE ${RESULT})
|
||||||
string(REGEX REPLACE "(....)-(..)-(..).*" "\\1-\\2-\\3" ${RESULT} ${${RESULT}})
|
string(REGEX REPLACE "(....)-(..)-(..).*" "\\1-\\2-\\3" ${RESULT} ${${RESULT}})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue