diff options
author | albert-github <albert.tests@gmail.com> | 2019-04-07 13:10:53 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2019-04-07 13:10:53 (GMT) |
commit | fa9dda01e6c013c7fe9be99b21d8bbf3c95c0482 (patch) | |
tree | 33fb7fab952dd602aa91ba29525e749e146a3596 /src/doxygen.cpp | |
parent | 16d025c8a08b485f5d43ade0986d716bd6aa06f8 (diff) | |
download | Doxygen-fa9dda01e6c013c7fe9be99b21d8bbf3c95c0482.zip Doxygen-fa9dda01e6c013c7fe9be99b21d8bbf3c95c0482.tar.gz Doxygen-fa9dda01e6c013c7fe9be99b21d8bbf3c95c0482.tar.bz2 |
Show git version information
Show the git version on designated places (currently version, help and Doxyfile difference).
The implementation is based on the git_watcher.cmake (https://github.com/andrew-hardin/cmake-git-version-tracking).
The information is useful to see which. master, version of doxygen is used for a build on systems where a lot of builds are make (Fossies.org) or very regular builds are made (CGAL)
Furthermore the tracking of the VERSION file was not done (when changed the version.cpp was not updated), this is corrected as well.
Diffstat (limited to 'src/doxygen.cpp')
-rw-r--r-- | src/doxygen.cpp | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 99878a5..aabb688 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -9927,7 +9927,14 @@ static void devUsage() static void usage(const char *name) { - msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2015\n\n",versionString); + if (strlen(gitVersionString)) + { + msg("Doxygen version %s (%s)\nCopyright Dimitri van Heesch 1997-2015\n\n",versionString,gitVersionString); + } + else + { + msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2015\n\n",versionString); + } msg("You can use doxygen in a number of ways:\n\n"); msg("1) Use doxygen to generate a template configuration file:\n"); msg(" %s [-s] -g [configName]\n\n",name); @@ -9982,6 +9989,8 @@ void initDoxygen() setlocale(LC_CTYPE,"C"); // to get isspace(0xA0)==0, needed for UTF-8 setlocale(LC_NUMERIC,"C"); + correctGitVersion(); + portable_correct_path(); Doxygen::runningTime.start(); @@ -10387,7 +10396,14 @@ void readConfiguration(int argc, char **argv) g_dumpSymbolMap = TRUE; break; case 'v': - msg("%s\n",versionString); + if (strlen(gitVersionString)) + { + msg("%s (%s)\n",versionString,gitVersionString); + } + else + { + msg("%s\n",versionString); + } cleanUpDoxygen(); exit(0); break; @@ -10399,7 +10415,14 @@ void readConfiguration(int argc, char **argv) } else if (qstrcmp(&argv[optind][2],"version")==0) { - msg("%s\n",versionString); + if (strlen(gitVersionString)) + { + msg("%s (%s)\n",versionString,gitVersionString); + } + else + { + msg("%s\n",versionString); + } cleanUpDoxygen(); exit(0); } |