--- a/src/CLIParser.h Sun Jan 19 18:41:32 2020 +0100
+++ b/src/CLIParser.h Mon Jan 20 12:39:22 2020 +0100
@@ -55,6 +55,7 @@
static const string_t OPTION_AS;
static const string_t OPTION_OPTION;
static const string_t OPTION_RELATION;
+ static const string_t OPTION_PARALLEL;
Configuration parse(const std::vector<string_t>& arguments) {
Configuration c;
@@ -79,6 +80,9 @@
currentOptions.push_back(readNext(arguments, i));
} else if (option == OPTION_RELATION) {
c.relation = readNext(arguments, i);
+ } else if (option == OPTION_PARALLEL) {
+ c.parallelism = std::stoi(readNext(arguments, i));
+ if (c.parallelism < 1) throw relpipe::cli::RelpipeCLIException(L"Number of parallel processes must be 1 or more.", relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
} else {
throw relpipe::cli::RelpipeCLIException(L"Unsupported CLI option: " + option, relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
}
@@ -119,6 +123,7 @@
const string_t CLIParser::OPTION_AS = L"--as";
const string_t CLIParser::OPTION_OPTION = L"--option";
const string_t CLIParser::OPTION_RELATION = L"--relation";
+const string_t CLIParser::OPTION_PARALLEL = L"--parallel";
}
}