diff options
author | Alberto Sartori <alberto.sartori@huawei.com> | 2022-04-21 14:43:02 +0200 |
---|---|---|
committer | Alberto Sartori <alberto.sartori@huawei.com> | 2022-04-21 14:43:02 +0200 |
commit | 3ea705c630b438fd6513fd6190190a559060f341 (patch) | |
tree | ec0e3fb8c2a2ee157a3c6f480c7edacd8b9174c2 /src/buildtool/common/cli.hpp | |
parent | 9077143d0585ad55f336751a5a5b92d1082438e6 (diff) | |
download | justbuild-3ea705c630b438fd6513fd6190190a559060f341.tar.gz |
add compatibility with original remote build protocol
Diffstat (limited to 'src/buildtool/common/cli.hpp')
-rw-r--r-- | src/buildtool/common/cli.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp index 8bb0ec89..c00b7b1b 100644 --- a/src/buildtool/common/cli.hpp +++ b/src/buildtool/common/cli.hpp @@ -12,6 +12,7 @@ #include "fmt/core.h" #include "gsl-lite/gsl-lite.hpp" #include "nlohmann/json.hpp" +#include "src/buildtool/compatibility/compatibility.hpp" #include "src/buildtool/logging/log_level.hpp" constexpr auto kDefaultLogLevel = LogLevel::Progress; @@ -374,4 +375,13 @@ static inline auto SetupGraphArguments( "missing KNOWN artifacts."); } +static inline auto SetupCompatibilityArguments( + gsl::not_null<CLI::App*> const& app) { + app->add_flag_function( + "--compatible", + [](auto /*unused*/) { Compatibility::SetCompatible(); }, + "At increased computational effort, be compatible with the original " + "remote build execution protocol. As the change affects identifiers, " + "the flag must be used consistently for all related invocations."); +} #endif // INCLUDED_SRC_BUILDTOOL_COMMON_CLI_HPP |