summaryrefslogtreecommitdiffstatshomepage
path: root/src/version.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-04-16 10:19:59 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-04-16 10:19:59 +0200
commit6bb33aa52c4e02989519f9dc04d11a94df76fd3e (patch)
tree31cbf91aa6e8d47b277ccd7478cd84b939520d7a /src/version.cpp
parent942472ea224e9cd0c4dff6a3abe0c4c331fc314b (diff)
Add short git version if building non-release build, also if git command is not available or if .git is not there (so building out of other sources) (nw)
Diffstat (limited to 'src/version.cpp')
-rw-r--r--src/version.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/version.cpp b/src/version.cpp
index 75859a6b57b..0721ba139d5 100644
--- a/src/version.cpp
+++ b/src/version.cpp
@@ -13,4 +13,10 @@
extern const char bare_build_version[];
extern const char build_version[];
const char bare_build_version[] = BARE_BUILD_VERSION;
-const char build_version[] = BARE_BUILD_VERSION " (" __DATE__")";
+#if defined(GIT_VERSION)
+#define VERSION_TO_STRING(s) XVERSION_TO_STRING(s)
+#define XVERSION_TO_STRING(ver) #ver
+const char build_version[] = BARE_BUILD_VERSION " (" VERSION_TO_STRING(GIT_VERSION) ")";
+#else
+const char build_version[] = BARE_BUILD_VERSION;
+#endif