From 50e725ae23124a10d56a615fb8b0ae80d0d2b4d3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 16 Jun 2020 13:07:31 +0200 Subject: Add metadata for exe{b}, including whether it is statically-linked Use this information to omit ad hoc C++ recipe tests is testing statically- linked build system. --- build2/b-options.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'build2/b-options.cxx') diff --git a/build2/b-options.cxx b/build2/b-options.cxx index 4dadf99..ce322cc 100644 --- a/build2/b-options.cxx +++ b/build2/b-options.cxx @@ -674,7 +674,9 @@ namespace build2 options:: options () - : v_ (), + : build2_metadata_ (), + build2_metadata_specified_ (false), + v_ (), V_ (), quiet_ (), silent_ (), @@ -787,6 +789,13 @@ namespace build2 { CLI_POTENTIALLY_UNUSED (a); + if (a.build2_metadata_specified_) + { + ::build2::cl::parser< uint64_t>::merge ( + this->build2_metadata_, a.build2_metadata_); + this->build2_metadata_specified_ = true; + } + if (a.v_) { ::build2::cl::parser< bool>::merge ( @@ -1202,6 +1211,9 @@ namespace build2 { _cli_options_map_init () { + _cli_options_map_["--build2-metadata"] = + &::build2::cl::thunk< options, uint64_t, &options::build2_metadata_, + &options::build2_metadata_specified_ >; _cli_options_map_["-v"] = &::build2::cl::thunk< options, bool, &options::v_ >; _cli_options_map_["-V"] = -- cgit v1.1