diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-05-15 11:20:31 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-05-15 16:31:11 +0200 |
commit | 44a7f88d0c6cd13087b422a4e8dd7b991b9be134 (patch) | |
tree | e6ef93f412a40ea8a6eac80d35ba240c2af9bb76 /src/buildtool/common/cli.hpp | |
parent | e16cd462f2cf9292bfb1d107991fd12621de2e08 (diff) | |
download | justbuild-44a7f88d0c6cd13087b422a4e8dd7b991b9be134.tar.gz |
Make --dump-artifacts-to-build act cummulatively
Diffstat (limited to 'src/buildtool/common/cli.hpp')
-rw-r--r-- | src/buildtool/common/cli.hpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp index 51cf3ef3..6b6ad535 100644 --- a/src/buildtool/common/cli.hpp +++ b/src/buildtool/common/cli.hpp @@ -75,7 +75,7 @@ struct AnalysisArguments { std::optional<std::filesystem::path> expression_root; std::vector<std::filesystem::path> graph_file; std::vector<std::filesystem::path> graph_file_plain; - std::optional<std::filesystem::path> artifacts_to_build_file; + std::vector<std::filesystem::path> artifacts_to_build_files; std::optional<std::filesystem::path> serve_errors_file; std::optional<std::string> profile; }; @@ -366,10 +366,14 @@ static inline auto SetupAnalysisArguments( "File path for writing the action graph description to.") ->type_name("PATH") ->trigger_on_parse(); - app->add_option("--dump-artifacts-to-build", - clargs->artifacts_to_build_file, - "File path for writing the artifacts to build to.") - ->type_name("PATH"); + app->add_option_function<std::string>( + "--dump-artifacts-to-build", + [clargs](auto const& file_) { + clargs->artifacts_to_build_files.emplace_back(file_); + }, + "File path for writing the artifacts to build to.") + ->type_name("PATH") + ->trigger_on_parse(); } } |