summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2022-05-09 16:12:32 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2022-05-09 16:44:53 +0200
commit77575870a0ce63abd8b87ff64080075a554daf93 (patch)
tree0509f6c1935a84b4083e1f71aa6c1c1cc8432f81 /src
parent787e2b327a6e71e51028c98d595312392cc82c00 (diff)
downloadjustbuild-77575870a0ce63abd8b87ff64080075a554daf93.tar.gz
CLI: Fix use of multiple RE property options
... which were all ignored except the last. CLI11 usually only calls the option function once all options have been parsed. This change ensures that the option function is called everytime the option is parsed.
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/common/cli.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp
index afa6cffd..17ebd3f0 100644
--- a/src/buildtool/common/cli.hpp
+++ b/src/buildtool/common/cli.hpp
@@ -266,13 +266,14 @@ static inline auto SetupBuildArguments(
throw CLI::ConversionError{property,
"--remote-execution-property"};
}
- clargs->platform_properties.emplace(std::move(key),
- std::move(val));
+ clargs->platform_properties[std::move(key)] = std::move(val);
},
- "Property for remote execution as key-value pair.")
+ "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);
+ ->expected(1, 1)
+ ->trigger_on_parse(true); // call this everytime the option is parsed
app->add_option_function<unsigned int>(
"--action-timeout",