summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-02-17 19:06:07 (GMT)
committerGitHub <noreply@github.com>2021-02-17 19:06:07 (GMT)
commit66b9dbd1fa132d088d2155dc80c44e954541a241 (patch)
treea0a3eaa627263e58b3c9c37af3b901842e29aaa2 /src
parent9afcc3e92623cbc5804a376e4d78fd79c577cf09 (diff)
parent668a528731167f6cf43cbfe8c9a2425790d453d8 (diff)
downloadDoxygen-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
Diffstat (limited to 'src')
-rw-r--r--src/doxygen.cpp59
1 files changed, 56 insertions, 3 deletions
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);
}