From: Adam Dickmeiss Date: Sat, 29 Apr 2006 08:51:00 +0000 (+0000) Subject: Option --version/-V shows program version X-Git-Tag: METAPROXY.1.0.3~23 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=d144815c1fb6bde8abd4f5b4950a09c2ab2fde03;p=metaproxy-moved-to-github.git Option --version/-V shows program version --- diff --git a/src/metaproxy_prog.cpp b/src/metaproxy_prog.cpp index d6f8251..d5e5d1f 100644 --- a/src/metaproxy_prog.cpp +++ b/src/metaproxy_prog.cpp @@ -1,4 +1,4 @@ -/* $Id: metaproxy_prog.cpp,v 1.3 2006-04-29 08:47:40 adam Exp $ +/* $Id: metaproxy_prog.cpp,v 1.4 2006-04-29 08:51:00 adam Exp $ Copyright (c) 2005-2006, Index Data. %LICENSE% @@ -26,6 +26,7 @@ int main(int argc, char **argv) po::options_description desc("Allowed options"); desc.add_options() ("help,h", "produce help message") + ("version,V", "show version") ("config", po::value< std::vector >(), "xml config") ; @@ -41,7 +42,10 @@ int main(int argc, char **argv) std::cout << desc << "\n"; return 1; } - + if (vm.count("version")) { + std::cout << "Metaproxy " VERSION "\n"; + return 0; + } xmlDocPtr doc = 0; if (vm.count("config")) {