aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/diagnostics.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-10-25 09:38:40 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-10-25 09:38:40 +0200
commit73fd1a275b7ed039ef3ca18a3706692e9e95177a (patch)
tree1565fca68586c4c23ac6ceedc507f8aed93e7d13 /libbuild2/diagnostics.cxx
parentaca0c7906724b2c0b648c06604e60fc3164e6f6a (diff)
Add --silent, remap verbosity 0 to 1 while building modules unless silent
Failed that, we may have long periods of seemingly nothing happening (e.g., during implicit bdep sync) while we quietly update the module, which may look like things have hung up.
Diffstat (limited to 'libbuild2/diagnostics.cxx')
-rw-r--r--libbuild2/diagnostics.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/libbuild2/diagnostics.cxx b/libbuild2/diagnostics.cxx
index 71f3d48..f1b8f74 100644
--- a/libbuild2/diagnostics.cxx
+++ b/libbuild2/diagnostics.cxx
@@ -21,6 +21,7 @@ namespace build2
// set from options.
//
uint16_t verb = 0;
+ bool silent = true;
optional<bool> diag_progress_option;
@@ -30,9 +31,12 @@ namespace build2
bool stderr_term = false;
void
- init_diag (uint16_t v, optional<bool> p, bool nl, bool nc, bool st)
+ init_diag (uint16_t v, bool s, optional<bool> p, bool nl, bool nc, bool st)
{
+ assert (!s || v == 0);
+
verb = v;
+ silent = s;
diag_progress_option = p;
diag_no_line = nl;
diag_no_column = nc;