AnsweredAssumed Answered

Automatically including a timestamp when building

Question asked by Nick Timkovich on Aug 3, 2010
Latest reply on Aug 18, 2010 by Nick Timkovich

How would I include the date/time my code was built at so it could be printed by the software when requested?


I tried adding a -DTIME=%time% to the compliler options (%time% on Windows is a special env. var) but it's passed literally in (as though "#define TIME %time%").


Using a define would seem to be the cleanest method; but I would also be content with including a file that was generated by some batch/Python script as part of the build process.  However, I don't know how to automatically run other things at build time.