projects
/
unres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
88754a8
)
cmake TIMESTAMP not working with older cmake
author
Cezary Czaplewski
<czarek@chem.univ.gda.pl>
Wed, 9 Sep 2020 19:59:33 +0000
(21:59 +0200)
committer
Cezary Czaplewski
<czarek@chem.univ.gda.pl>
Wed, 9 Sep 2020 19:59:33 +0000
(21:59 +0200)
CMakeLists.txt
patch
|
blob
|
history
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index
0e6f8ca
..
689bb9c
100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-20,9
+20,10
@@
MACRO (TODAY RESULT)
EXECUTE_PROCESS(COMMAND "date" "/T" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(..)/(..)/..(..).*" "\\3\\2\\1" ${RESULT} ${${RESULT}})
ELSEIF(UNIX)
EXECUTE_PROCESS(COMMAND "date" "/T" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(..)/(..)/..(..).*" "\\3\\2\\1" ${RESULT} ${${RESULT}})
ELSEIF(UNIX)
-# EXECUTE_PROCESS(COMMAND "date" OUTPUT_VARIABLE ${RESULT})
-# string(REGEX REPLACE "(...) (...) (.+) (..:..:..) (.+) (....).*" "\\1 \\2 \\3 \\4 \\5 \\6" ${RESULT} ${${RESULT}})
- string(TIMESTAMP ${RESULT})
+ EXECUTE_PROCESS(COMMAND "date" "+'%D %R:%S'" OUTPUT_VARIABLE ${RESULT})
+ string(REGEX REPLACE "'" "" ${RESULT} ${${RESULT}})
+ string (STRIP ${${RESULT}} ${RESULT})
+# string(TIMESTAMP ${RESULT})
ELSE (WIN32)
MESSAGE(SEND_ERROR "date not implemented")
SET(${RESULT} 000000)
ELSE (WIN32)
MESSAGE(SEND_ERROR "date not implemented")
SET(${RESULT} 000000)