diff options
Diffstat (limited to 'src/buildtool/common/cli.hpp')
-rw-r--r-- | src/buildtool/common/cli.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp index 17ebd3f0..fdfb08b9 100644 --- a/src/buildtool/common/cli.hpp +++ b/src/buildtool/common/cli.hpp @@ -30,6 +30,7 @@ struct CommonArguments { /// \brief Arguments required for analysing targets. struct AnalysisArguments { + std::string defines{}; std::filesystem::path config_file{}; std::optional<nlohmann::json> target{}; std::optional<std::string> target_file_name{}; @@ -137,6 +138,12 @@ static inline auto SetupAnalysisArguments( gsl::not_null<AnalysisArguments*> const& clargs, bool with_graph = true) { app->add_option( + "-D,--defines", + clargs->defines, + "Define configuration variables via an in-line JSON object.\n" + "Latest wins. Supersedes values provided via --config") + ->type_name("JSON"); + app->add_option( "-c,--config", clargs->config_file, "Path to configuration file.") ->type_name("PATH"); app->add_option_function<std::vector<std::string>>( |