From 402d04692271962574475c09013a36c740c5e154 Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Thu, 19 Mar 2015 10:06:36 +0100 Subject: [PATCH] added revision to version string (0.3 --> 0.3.1) to more easily see if testing the correct version (e.g. if patching tarballs) also added build date to output of pingcheck --version --- CMakeLists.txt | 2 ++ src/main.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b283aaf..6d6b5d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/src/main.cpp b/src/main.cpp index 2f6be63..53b1b97 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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; } -- 1.7.1