summaryrefslogtreecommitdiff
path: root/src/buildtool/common/cli.hpp
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2022-06-13 13:30:13 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2022-06-13 15:55:41 +0200
commite4bbf59415e610fc090572aff29cd20cdb9c41f8 (patch)
tree41f8f3e3fae12c6ea21e4ac18d124dad08e6748c /src/buildtool/common/cli.hpp
parent47bb77c39199ae4842f79347de076a4534f7d310 (diff)
downloadjustbuild-e4bbf59415e610fc090572aff29cd20cdb9c41f8.tar.gz
RemoteExecutionConfig: Keep global platform properties
... and cache endpoint address for rebuilding.
Diffstat (limited to 'src/buildtool/common/cli.hpp')
-rw-r--r--src/buildtool/common/cli.hpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp
index ab4a7ff1..adfa3445 100644
--- a/src/buildtool/common/cli.hpp
+++ b/src/buildtool/common/cli.hpp
@@ -62,7 +62,7 @@ struct EndpointArguments {
/// \brief Arguments required for building.
struct BuildArguments {
std::optional<std::vector<std::string>> local_launcher{std::nullopt};
- std::map<std::string, std::string> platform_properties;
+ std::vector<std::string> platform_properties;
std::chrono::milliseconds timeout{kDefaultTimeout};
std::size_t build_jobs{};
std::optional<std::string> dump_artifacts{std::nullopt};
@@ -262,25 +262,14 @@ static inline auto SetupBuildArguments(
->type_name("JSON")
->default_val(nlohmann::json{"env", "--"}.dump());
- app->add_option_function<std::string>(
+ app->add_option(
"--remote-execution-property",
- [clargs](auto const& property) {
- std::istringstream pss(property);
- std::string key;
- std::string val;
- if (not std::getline(pss, key, ':') or
- not std::getline(pss, val, ':')) {
- throw CLI::ConversionError{property,
- "--remote-execution-property"};
- }
- clargs->platform_properties[std::move(key)] = std::move(val);
- },
+ clargs->platform_properties,
"Property for remote execution as key-value pair. Specifying this "
"option multiple times will accumulate pairs (latest wins).")
->type_name("KEY:VAL")
->allow_extra_args(false)
- ->expected(1, 1)
- ->trigger_on_parse(true); // call this everytime the option is parsed
+ ->expected(1, 1);
app->add_option_function<unsigned int>(
"--action-timeout",