summaryrefslogtreecommitdiffstats
path: root/addon/doxmlparser/examples
diff options
context:
space:
mode:
Diffstat (limited to 'addon/doxmlparser/examples')
-rw-r--r--addon/doxmlparser/examples/metrics/CMakeLists.txt2
-rw-r--r--addon/doxmlparser/examples/metrics/main.cpp21
2 files changed, 21 insertions, 2 deletions
diff --git a/addon/doxmlparser/examples/metrics/CMakeLists.txt b/addon/doxmlparser/examples/metrics/CMakeLists.txt
index 255ae0e..7e99a08 100644
--- a/addon/doxmlparser/examples/metrics/CMakeLists.txt
+++ b/addon/doxmlparser/examples/metrics/CMakeLists.txt
@@ -1,6 +1,7 @@
include_directories(
../../include
+ ${PROJECT_SOURCE_DIR}/libversion
)
add_executable(doxmlparser_metrics
@@ -10,6 +11,7 @@ main.cpp
target_link_libraries(doxmlparser_metrics
doxmlparser
+ doxygen_version
qtools
${COVERAGE_LINKER_FLAGS}
)
diff --git a/addon/doxmlparser/examples/metrics/main.cpp b/addon/doxmlparser/examples/metrics/main.cpp
index 1328abe..9e301b1 100644
--- a/addon/doxmlparser/examples/metrics/main.cpp
+++ b/addon/doxmlparser/examples/metrics/main.cpp
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <string.h>
#include <doxmlintf.h>
+#include "version.h"
bool isDocumented(IDocRoot *brief,IDocRoot *detailed)
{
@@ -49,9 +50,25 @@ bool isDocumented(IDocRoot *brief,IDocRoot *detailed)
int main(int argc,char **argv)
{
- if (argc!=2)
+ int locArgc = argc;
+
+ if (locArgc == 2)
+ {
+ if (!strcmp(argv[1],"--help"))
+ {
+ printf("Usage: %s xml_dir\n",argv[0]);
+ exit(0);
+ }
+ else if (!strcmp(argv[1],"--version"))
+ {
+ printf("%s version: %s\n",argv[0],getFullVersion());
+ exit(0);
+ }
+ }
+
+ if (locArgc!=2)
{
- printf("Usage: %s xml_output_dir\n",argv[0]);
+ printf("Usage: %s xml_dir\n",argv[0]);
exit(1);
}