From 1705587ecd715f2dedcddb688638cef9a9d19b1b Mon Sep 17 00:00:00 2001 From: Mate Soos Date: Fri, 27 Sep 2024 18:44:11 +0200 Subject: [PATCH] Fixing version printing --- src/main.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 7e32a94e0..071fd9e15 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,7 +26,6 @@ THE SOFTWARE. #define _GNU_SOURCE #endif -#include #endif #define DEBUG_DIMACSPARSER_CMS @@ -38,17 +37,12 @@ THE SOFTWARE. #include #include #include -#include -#include #include #include -#include -#include -#include +#include #include #include "main.h" -#include "main_common.h" #include "time_mem.h" #include "dimacsparser.h" #include "cryptominisat.h" @@ -60,7 +54,6 @@ using namespace CMSat; using std::cout; using std::cerr; using std::endl; -using std::map; double wallclock_time_started = 0.0; struct WrongParam { @@ -233,6 +226,10 @@ void Main::add_supported_options() { .action([&](const auto& a) {conf.verbosity = std::atoi(a.c_str());}) .default_value(conf.verbosity) .help("[0-10] Verbosity of solver. 0 = only solution"); + program.add_argument("--version") + .action([&](const auto ) {printVersionInfo();}) + .flag() + .help("Print version information"); program.add_argument("--maxtime") .help("Stop solving after this much time (s)") .scan<'g', double>();