how to add revision and build date to source
Posted
by gucki
on Stack Overflow
See other posts from Stack Overflow
or by gucki
Published on 2010-04-23T07:48:39Z
Indexed on
2010/04/23
7:53 UTC
Read the original article
Hit count: 340
Hi!
I have a gcc project and would like to automatically add defines for build date and revision number (from git) to my sources. What's the best way to do this?
My goal is simple to be able to do something like this on startup: printf("Test app build on %s, revision %d", BUILD_DATE, REVISION)
For building I'm using make with a simple Makefile.inc, not autoconf ot anything like this.
Thanks, Corin
© Stack Overflow or respective owner