aboutsummaryrefslogtreecommitdiff
path: root/build2/b-options.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-09-22 11:28:53 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-09-22 11:28:53 +0200
commitd06e8d1d3b0594c74fa444da76c3c7925ed58f70 (patch)
treea2c6d46e285b8109adc53a7ee2562cd26126a399 /build2/b-options.cxx
parent9f72ad00a0654bc965ff527615e02fd35596073c (diff)
Add ability to skip external modules during bootstrap (--no-external-modules)
Diffstat (limited to 'build2/b-options.cxx')
-rw-r--r--build2/b-options.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/build2/b-options.cxx b/build2/b-options.cxx
index 95772bb..316d7ad 100644
--- a/build2/b-options.cxx
+++ b/build2/b-options.cxx
@@ -698,6 +698,7 @@ namespace build2
serial_stop_ (),
dry_run_ (),
match_only_ (),
+ no_external_modules_ (),
structured_result_ (),
mtime_check_ (),
no_mtime_check_ (),
@@ -898,6 +899,12 @@ namespace build2
this->match_only_, a.match_only_);
}
+ if (a.no_external_modules_)
+ {
+ ::build2::cl::parser< bool>::merge (
+ this->no_external_modules_, a.no_external_modules_);
+ }
+
if (a.structured_result_)
{
::build2::cl::parser< bool>::merge (
@@ -1110,6 +1117,12 @@ namespace build2
<< " mode is primarily useful for profiling." << ::std::endl;
os << std::endl
+ << "\033[1m--no-external-modules\033[0m Don't load external modules during project bootstrap." << ::std::endl
+ << " Note that this option can only be used with" << ::std::endl
+ << " meta-operations that do not load the project's" << ::std::endl
+ << " \033[1mbuildfiles\033[0m, such as \033[1minfo\033[0m." << ::std::endl;
+
+ os << std::endl
<< "\033[1m--structured-result\033[0m Write the result of execution in a structured form. In" << ::std::endl
<< " this mode, instead of printing to \033[1mSTDERR\033[0m diagnostics" << ::std::endl
<< " messages about the outcome of executing actions on" << ::std::endl
@@ -1267,6 +1280,8 @@ namespace build2
&::build2::cl::thunk< options, bool, &options::dry_run_ >;
_cli_options_map_["--match-only"] =
&::build2::cl::thunk< options, bool, &options::match_only_ >;
+ _cli_options_map_["--no-external-modules"] =
+ &::build2::cl::thunk< options, bool, &options::no_external_modules_ >;
_cli_options_map_["--structured-result"] =
&::build2::cl::thunk< options, bool, &options::structured_result_ >;
_cli_options_map_["--mtime-check"] =