allow short style syntax for long options e.g "-x3", "-validate-features" etc.

This commit is contained in:
artemp 2016-11-11 10:48:03 +01:00
parent 19f1af3861
commit 99ce79fd36

View file

@ -90,7 +90,11 @@ int main (int argc, char** argv)
po::positional_options_description p; po::positional_options_description p;
p.add("files",-1); p.add("files",-1);
po::variables_map vm; po::variables_map vm;
po::store(po::command_line_parser(argc, argv).options(desc).positional(p).run(), vm); po::store(po::command_line_parser(argc, argv)
.options(desc)
.style(po::command_line_style::unix_style | po::command_line_style::allow_long_disguise)
.positional(p)
.run(), vm);
po::notify(vm); po::notify(vm);
if (vm.count("version")) if (vm.count("version"))