Commit 3a2fe034 authored by Praetorius, Simon's avatar Praetorius, Simon

command line parser for petsc-parameters

parent 5c682093
......@@ -55,14 +55,22 @@ namespace AMDiS {
("init-file", po::value<std::string>(), "set init file")
("rs", po::value<int>(), "set restart parameter")
("parameters", po::value<std::string>(), "set parameter in init file\nsyntax: \"key1: value1; key2: value2...\"");
po::options_description hidden("Hidden options");
("unknown", po::value<std::vector<std::string> >(), "unknown options");
po::options_description cmdline_options;
// first argument is init-filename
po::positional_options_description p;
p.add("init-file", 1);
p.add("unknown", -1);
// parse comandline
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(cmdline_options).positional(p).allow_unregistered().run(), vm);
// print help message
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment