aboutsummaryrefslogtreecommitdiffstats
path: root/src/zmq2edi/zmq2edi.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-11-02 07:10:18 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-11-02 07:10:18 +0100
commit54549c6c08494781aec262987411fe3a354ffd73 (patch)
treee5191adf6ee820f51386629be2fdf98085f509b1 /src/zmq2edi/zmq2edi.cpp
parentd81d01682e4a16a27e7140c339e6bb8ee69e4286 (diff)
downloaddabmux-54549c6c08494781aec262987411fe3a354ffd73.tar.gz
dabmux-54549c6c08494781aec262987411fe3a354ffd73.tar.bz2
dabmux-54549c6c08494781aec262987411fe3a354ffd73.zip
Add --version to zmq2edi and zmq2farsync
Diffstat (limited to 'src/zmq2edi/zmq2edi.cpp')
-rw-r--r--src/zmq2edi/zmq2edi.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/zmq2edi/zmq2edi.cpp b/src/zmq2edi/zmq2edi.cpp
index 20ddcbe..d907e6d 100644
--- a/src/zmq2edi/zmq2edi.cpp
+++ b/src/zmq2edi/zmq2edi.cpp
@@ -453,6 +453,18 @@ int start(int argc, char **argv)
int main(int argc, char **argv)
{
+ // Version handling is done very early to ensure nothing else but the version gets printed out
+ if (argc == 2 and strcmp(argv[1], "--version") == 0) {
+ fprintf(stdout, "%s\n",
+#if defined(GITVERSION)
+ GITVERSION
+#else
+ PACKAGE_VERSION
+#endif
+ );
+ return 0;
+ }
+
etiLog.level(info) << "ZMQ2EDI converter from " <<
PACKAGE_NAME << " " <<
#if defined(GITVERSION)