#include #include /* - On some systems git is not installed or * installed on a place where FindGit.cmake cannot find it * - No git information is present (no .git directory) * in those cases clear the gitVersionString (would have string GIT-NOTFOUND). */ char *getGitVersion(void) { static char gitVersionString[100]; strcpy(gitVersionString,"@GIT_HEAD_SHA1@"); strcat(gitVersionString,!strcmp("@GIT_IS_DIRTY@","true")?"*":""); if (!strcmp("@GIT_HEAD_SHA1@", "GIT-NOTFOUND")) gitVersionString[0] = '\0'; return gitVersionString; }