diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2021-02-17 19:06:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-17 19:06:07 (GMT) |
commit | 66b9dbd1fa132d088d2155dc80c44e954541a241 (patch) | |
tree | a0a3eaa627263e58b3c9c37af3b901842e29aaa2 | |
parent | 9afcc3e92623cbc5804a376e4d78fd79c577cf09 (diff) | |
parent | 668a528731167f6cf43cbfe8c9a2425790d453d8 (diff) | |
download | Doxygen-66b9dbd1fa132d088d2155dc80c44e954541a241.zip Doxygen-66b9dbd1fa132d088d2155dc80c44e954541a241.tar.gz Doxygen-66b9dbd1fa132d088d2155dc80c44e954541a241.tar.bz2 |
Merge pull request #8365 from albert-github/feature/bug_ext_version
Extended doxygen version information
-rw-r--r-- | doc/trouble.doc | 3 | ||||
-rw-r--r-- | src/doxygen.cpp | 59 |
2 files changed, 58 insertions, 4 deletions
diff --git a/doc/trouble.doc b/doc/trouble.doc index cb50399..5405a81 100644 --- a/doc/trouble.doc +++ b/doc/trouble.doc @@ -106,7 +106,8 @@ helpful and it will cost me much more time to figure out what you mean. In the worst-case your bug report may even be completely ignored by me, so always try to include the following information in your bug report: - The version of doxygen you are using (for instance 1.5.3, use - `doxygen --version` if you are not sure). + `doxygen --version` if you are not sure or `doxygen --Version` for a bit + more information). - The name and version number of your operating system (for instance Ubuntu Linux 18.04 LTS) - It is usually a good idea to send along the configuration file as well, diff --git a/src/doxygen.cpp b/src/doxygen.cpp index f5a280b..28bb49b 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -106,6 +106,14 @@ #include "clangparser.h" #include "symbolresolver.h" +#if USE_SQLITE3 +#include <sqlite3.h> +#endif + +#if USE_LIBCLANG +#include <clang/Basic/Version.h> +#endif + // provided by the generated file resources.cpp extern void initResources(); @@ -9959,6 +9967,39 @@ static void devUsage() //---------------------------------------------------------------------------- +// print the version of doxygen + +static void version(const bool extended) +{ + QCString versionString = getFullVersion(); + msg("%s\n",versionString.data()); + if (extended) + { + QCString extVers; +#if USE_SQLITE3 + if (!extVers.isEmpty()) extVers+= ", "; + extVers += "sqlite3 "; + extVers += sqlite3_libversion(); +#endif +#if USE_LIBCLANG + if (!extVers.isEmpty()) extVers+= ", "; + extVers += "clang support "; + extVers += CLANG_VERSION_STRING; +#endif +#if MULTITHREADED_SOURCE_GENERATOR + if (!extVers.isEmpty()) extVers+= ", "; + extVers += "multi-threaded support "; +#endif + if (!extVers.isEmpty()) + { + int lastComma = extVers.findRev(','); + if (lastComma != -1) extVers = extVers.replace(lastComma,1," and"); + msg(" with %s.\n",extVers.data()); + } + } +} + +//---------------------------------------------------------------------------- // print the usage of doxygen static void usage(const char *name,const char *versionString) @@ -9992,7 +10033,7 @@ static void usage(const char *name,const char *versionString) msg("If -s is specified the comments of the configuration items in the config file will be omitted.\n"); msg("If configName is omitted 'Doxyfile' will be used as a default.\n"); msg("If - is used for configFile doxygen will write / read the configuration to /from standard output / input.\n\n"); - msg("-v print version string\n"); + msg("-v print version string, -V print extended version information\n"); } //---------------------------------------------------------------------------- @@ -10400,7 +10441,12 @@ void readConfiguration(int argc, char **argv) g_dumpSymbolMap = TRUE; break; case 'v': - msg("%s\n",versionString.data()); + version(false); + cleanUpDoxygen(); + exit(0); + break; + case 'V': + version(true); cleanUpDoxygen(); exit(0); break; @@ -10412,7 +10458,14 @@ void readConfiguration(int argc, char **argv) } else if (qstrcmp(&argv[optind][2],"version")==0) { - msg("%s\n",versionString.data()); + version(false); + cleanUpDoxygen(); + exit(0); + } + else if ((qstrcmp(&argv[optind][2],"Version")==0) || + (qstrcmp(&argv[optind][2],"VERSION")==0)) + { + version(true); cleanUpDoxygen(); exit(0); } |