added revision to version string (0.3 --> 0.3.1) to more easily see if testing the...
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Thu, 19 Mar 2015 09:06:36 +0000 (10:06 +0100)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Thu, 19 Mar 2015 09:06:36 +0000 (10:06 +0100)
also added build date to output of pingcheck --version

CMakeLists.txt
src/main.cpp

index b283aaf..6d6b5d5 100644 (file)
@@ -1,6 +1,7 @@
 # project: definitions
 project(pingcheck)
 set(VERSION 0.3)
+set(VERSION_REVISION 1)
 set(TARGET ${PROJECT_NAME})
 
 # cmake: build options
@@ -20,6 +21,7 @@ add_definitions(
     #-O2
     -DVERSION_STRING=${VERSION}
     -DPROJECT_NAME=\"${PROJECT_NAME}\"
+    -DVERSION_REVISION_STRING=${VERSION}
 )
 
 # package: package information
index 2f6be63..53b1b97 100644 (file)
@@ -470,7 +470,8 @@ int main( int argc, const char *argv[] )
         if ( configuration->get_print_version() )     // do this even if parsing of config failed
         {
             GlobalLogger.debug() << "Printing version info (" << VERSION_STRING << ") and exit" << endl;
-            cout << PROJECT_NAME << " version " << VERSION_STRING << endl;
+            cout << PROJECT_NAME << " version " << VERSION_STRING << "."
+                 << VERSION_REVISION_STRING << " build " << __DATE__ << endl;
             return 0;
         }