From b71fa164192f1af8b702e1578cf202b510a9b281 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 27 Nov 2018 14:20:10 +0200 Subject: Add --dump option, omit state dumping from verbosity level 6 --- build2/b-options.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'build2/b-options.cxx') 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, &options::dump_, + &options::dump_specified_ >; _cli_options_map_["--jobs"] = &::build2::cl::thunk< options, size_t, &options::jobs_, &options::jobs_specified_ >; -- cgit v1.1