From ce6b597a69e35af647a227588de2deb15c786de8 Mon Sep 17 00:00:00 2001 From: Andrea Bignamini <bignamini@oats.inaf.it> Date: Wed, 7 Feb 2018 15:31:50 +0000 Subject: [PATCH] Add version option Add version option to get the version of the preProcessor-srv. --- src/Version.h | 7 +++++++ src/main.cpp | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 src/Version.h diff --git a/src/Version.h b/src/Version.h new file mode 100644 index 0000000..962a518 --- /dev/null +++ b/src/Version.h @@ -0,0 +1,7 @@ +// Version.h +#if !defined(VERSION_H) +#define VERSION_H 1 + +std::string version = "1.0.2"; + +#endif diff --git a/src/main.cpp b/src/main.cpp index bf4fb1a..3482333 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,9 +37,14 @@ // (Program Obviously used to Generate tango Object) //============================================================================= #include <tango.h> +#include <Version.h> int main(int argc,char *argv[]) { + if (std::string(argv[1]) == "--version"){ + cout << version << endl; + return(0); + } try { // Initialise the device server -- GitLab