CMake Conversion Date Format

I am in the process of converting a configure script to a cmake system. In any case, I came across an apparent brick wall with a specific line:

COMMIT_DATE=$(date +"%Y%m%d-%H%M" -ud "$(LC_ALL=C svn info | grep 'Changed Date' | cut -c20-45)")

How can I format a date in cmake? Or, believing that I cannot, what is the best, cross-platform way to do this? Obviously, this configure script currently only works with linux, however I would like the solution to be as cross-platform as possible.

The svn part can be performed relatively easily, so there is no need to worry about it except the date entry line: (for example, "2013-10-14 21:55:05 +0100"

+4
source share
1 answer

string, TIMESTAMP, .

, timestamp 2.8.11 CMake, , , .

+2

All Articles