From 566bcb8c4c36d12e398f00349c5f27cae06fa7a9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 27 Jul 2017 18:40:52 +0200 Subject: Implement displaying build progress (--progress|-p) --- build2/b-options.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'build2/b-options.cxx') diff --git a/build2/b-options.cxx b/build2/b-options.cxx index 50871f0..1cb5b2e 100644 --- a/build2/b-options.cxx +++ b/build2/b-options.cxx @@ -571,6 +571,7 @@ namespace build2 options () : v_ (), V_ (), + progress_ (), quiet_ (), verbose_ (1), verbose_specified_ (false), @@ -675,6 +676,11 @@ namespace build2 << " equivalent to \033[1m--verbose 3\033[0m." << ::std::endl; os << std::endl + << "\033[1m--progress\033[0m|\033[1m-p\033[0m Display build progress. Only usable when printing to a" << ::std::endl + << " terminal but can be combined with various verbosity" << ::std::endl + << " levels." << ::std::endl; + + os << std::endl << "\033[1m--quiet\033[0m|\033[1m-q\033[0m Run quietly, only printing error messages. This is" << ::std::endl << " equivalent to \033[1m--verbose 0\033[0m." << ::std::endl; @@ -791,6 +797,10 @@ namespace build2 &::build2::cl::thunk< options, bool, &options::v_ >; _cli_options_map_["-V"] = &::build2::cl::thunk< options, bool, &options::V_ >; + _cli_options_map_["--progress"] = + &::build2::cl::thunk< options, bool, &options::progress_ >; + _cli_options_map_["-p"] = + &::build2::cl::thunk< options, bool, &options::progress_ >; _cli_options_map_["--quiet"] = &::build2::cl::thunk< options, bool, &options::quiet_ >; _cli_options_map_["-q"] = -- cgit v1.1