The compiler (cl.exe) has predefined macros __DATE__
and __TIME__
, as well as __TIMESTAMP__
. You can compile a file containing only these as a pre-link step.
Martin v. Löwis
2009-08-23 22:19:25
The compiler (cl.exe) has predefined macros __DATE__
and __TIME__
, as well as __TIMESTAMP__
. You can compile a file containing only these as a pre-link step.
Another alternative is to use the preprocessor to include the generated file:
#include "BuildTimeStamp.c"
The file that includes this file can be one of the files in the project under source control.