void parseCommandLine(int argc, char *argv[]) { using namespace Sawyer::CommandLine; Parser p = Rose::CommandLine::createEmptyParser(purpose, description); p.errorStream(::mlog[FATAL]); p.doc("Synopsis", "@prop{programName} [@v{switches}]"); SwitchGroup switches = Rose::CommandLine::genericSwitches(); switches.name(""); if (!p.with(switches).parse(argc, argv).apply().unreachedArgs().empty()) { ::mlog[FATAL] <<"incorrect usage; see --help\n"; exit(1); } }