aboutsummaryrefslogtreecommitdiff
path: root/build2/b-options.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-11-27 14:20:10 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-11-27 14:20:10 +0200
commitb71fa164192f1af8b702e1578cf202b510a9b281 (patch)
tree99e3cc0965b2fce6fe1be4151eef1e1bb44af59f /build2/b-options.cxx
parentb48666e580abf54d426d13840f49242aa2569bb2 (diff)
Add --dump <phase> option, omit state dumping from verbosity level 6
Diffstat (limited to 'build2/b-options.cxx')
-rw-r--r--build2/b-options.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/build2/b-options.cxx b/build2/b-options.cxx
index 9b5e427..23ebae7 100644
--- a/build2/b-options.cxx
+++ b/build2/b-options.cxx
@@ -601,6 +601,8 @@ namespace build2
verbose_ (1),
verbose_specified_ (false),
stat_ (),
+ dump_ (),
+ dump_specified_ (false),
jobs_ (),
jobs_specified_ (false),
max_jobs_ (),
@@ -734,12 +736,18 @@ namespace build2
<< " 3. All underlying commands being executed." << ::std::endl
<< " 4. Information that could be helpful to the user." << ::std::endl
<< " 5. Information that could be helpful to the developer." << ::std::endl
- << " 6. Even more detailed information, including state dumps." << ::std::endl;
+ << " 6. Even more detailed information." << ::std::endl;
os << std::endl
<< "\033[1m--stat\033[0m Display build statistics." << ::std::endl;
os << std::endl
+ << "\033[1m--dump\033[0m \033[4mphase\033[0m Dump the build system state after the specified phase." << ::std::endl
+ << " Valid \033[4mphase\033[0m values are \033[1mload\033[0m (after loading \033[1mbuildfiles\033[0m) and" << ::std::endl
+ << " \033[1mmatch\033[0m (after matching rules to targets). Repeat this" << ::std::endl
+ << " option to dump the state after multiple phases." << ::std::endl;
+
+ os << std::endl
<< "\033[1m--jobs\033[0m|\033[1m-j\033[0m \033[4mnum\033[0m Number of active jobs to perform in parallel. This" << ::std::endl
<< " includes both the number of active threads inside the" << ::std::endl
<< " build system as well as the number of external commands" << ::std::endl
@@ -890,6 +898,9 @@ namespace build2
&options::verbose_specified_ >;
_cli_options_map_["--stat"] =
&::build2::cl::thunk< options, bool, &options::stat_ >;
+ _cli_options_map_["--dump"] =
+ &::build2::cl::thunk< options, std::set<string>, &options::dump_,
+ &options::dump_specified_ >;
_cli_options_map_["--jobs"] =
&::build2::cl::thunk< options, size_t, &options::jobs_,
&options::jobs_specified_ >;