| 756 | } |
| 757 | |
| 758 | std::optional<po::variables_map> Phaser::parseCommandLine(int _argc, char** _argv) |
| 759 | { |
| 760 | auto [keywordDescription, positionalDescription] = buildCommandLineDescription(); |
| 761 | |
| 762 | po::variables_map arguments; |
| 763 | po::notify(arguments); |
| 764 | |
| 765 | po::command_line_parser parser(_argc, _argv); |
| 766 | parser.options(keywordDescription).positional(positionalDescription); |
| 767 | po::store(parser.run(), arguments); |
| 768 | |
| 769 | if (arguments.count("help") > 0) |
| 770 | { |
| 771 | std::cout << keywordDescription << std::endl; |
| 772 | return std::nullopt; |
| 773 | } |
| 774 | |
| 775 | if (arguments.count("input-files") == 0) |
| 776 | assertThrow(false, NoInputFiles, "Missing argument: input-files."); |
| 777 | |
| 778 | return arguments; |
| 779 | } |
| 780 | |
| 781 | void Phaser::initialiseRNG(po::variables_map const& _arguments) |
| 782 | { |