Add build time and git head strings to CBuildConfig

refs #902
This commit is contained in:
Roland Winklmeier
2017-03-10 22:16:42 +01:00
committed by Mathew Sutcliffe
parent eea6c31e7b
commit 15b50791ef
4 changed files with 28 additions and 0 deletions

View File

@@ -17,4 +17,13 @@ SOURCES += *.cpp
DESTDIR = $$DestRoot/lib
OTHER_FILES += buildconfig_gen.cpp.in
win32: GIT_BIN = $$system($$(SYSTEMROOT)\system32\where git 2> nul)
else: GIT_BIN = $$system(which git 2> /dev/null)
isEmpty(GIT_BIN) {
GIT_HEAD_SHA1="<unknown>"
} else {
GIT_HEAD_SHA1=$$system(git rev-parse --short HEAD)
}
load(common_post)