[CMake] How best to capture the current Date/Time

Bill Hoffman bill.hoffman at kitware.com
Fri Mar 20 10:34:43 EDT 2009


Michael Jackson wrote:

>> I don't think you could do this as a set of variables.  It would be 
>> better as some sort of command.  file(GETDATE result) or something.
>>
>> -Bill
> 
> Well, I could but I am really interested in _why_ I would _not_ want to? 
> Besides the obvious that the variables would basically change every time 
> that cmake ran which might have some unwanted side effects.
> 

That would be the problem.  The would be variables that would change 
with ever access, it would be very "special" code to handle that.  A 
command that returns the date is very easy and "normal" to implement.

-Bill


More information about the CMake mailing list