Not.
But if you use qmake , you can set the compiler flags in the build system based on the results of arbitrary commands, which can be useful for doing what you want.
For example, if you used git, you could do something like this in your .pro file:
REVISION = $$system(git rev-parse HEAD) DEFINES += APP_REVISION=$$REVISION
This will give you the APP_REVISION macro when compiling your program, which you can use as follows:
// stringize macro
rohanpm
source share