diff options
Diffstat (limited to 'src/gitversion.cpp.in')
-rw-r--r-- | src/gitversion.cpp.in | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gitversion.cpp.in b/src/gitversion.cpp.in new file mode 100644 index 0000000..cbb9b13 --- /dev/null +++ b/src/gitversion.cpp.in @@ -0,0 +1,14 @@ +#include <string.h> + +char gitVersionString[]="@GIT_HEAD_SHA1@"; + +/* - On some systems git is not installed or + * installed on a place whete FindGit.cmake cannot find it + * - No git information is present (no .git directory) + * in those cases clear the gitVersionString (would have string GIT-NOTFOUND). + */ +void correctGitVersion(void) +{ + if (!strcmp(gitVersionString, "GIT-NOTFOUND")) gitVersionString[0] = '\0'; +} + |