mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 17:41:45 +00:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b5bb476b0d | ||
|
ea7ae04025 | ||
|
02692e7002 |
@@ -117,16 +117,22 @@ void ProgOptions::ParseAll(const int argc, char const* const* argv, bool allowUn
|
||||
// clear the container because it was filled with default values and subsequent calls to store() do not overwrite the existing values
|
||||
fVarMap.clear();
|
||||
|
||||
if (allowUnregistered) {
|
||||
po::command_line_parser parser(argc, argv);
|
||||
parser.options(fAllOptions).allow_unregistered();
|
||||
po::parsed_options parsed = parser.run();
|
||||
fUnregisteredOptions = po::collect_unrecognized(parsed.options, po::include_positional);
|
||||
|
||||
po::store(parsed, fVarMap);
|
||||
} else {
|
||||
po::store(po::parse_command_line(argc, argv, fAllOptions), fVarMap);
|
||||
po::command_line_parser parser(argc, argv);
|
||||
|
||||
if (allowUnregistered) {
|
||||
parser.options(fAllOptions).allow_unregistered();
|
||||
}
|
||||
|
||||
using namespace po::command_line_style;
|
||||
style_t style = style_t(allow_short | short_allow_adjacent | short_allow_next | allow_long | long_allow_adjacent | long_allow_next | allow_sticky | allow_dash_for_short);
|
||||
parser.style(style);
|
||||
|
||||
po::parsed_options parsed = parser.run();
|
||||
|
||||
fUnregisteredOptions = po::collect_unrecognized(parsed.options, po::include_positional);
|
||||
|
||||
po::store(parsed, fVarMap);
|
||||
}
|
||||
|
||||
void ProgOptions::Notify()
|
||||
|
@@ -36,6 +36,7 @@ namespace
|
||||
|
||||
extern "C" auto sigterm_handler(int signal) -> void
|
||||
{
|
||||
++gSignalCount;
|
||||
gLastSignal = signal;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user