aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/context.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-12-08 10:49:57 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-12-08 10:49:57 +0200
commitf7600f07eecbdac0a4400ca2bc39e3e9f5a53b1b (patch)
tree3bc35a46a68b41dab1148fdbac1d64b818b53960 /libbuild2/context.cxx
parente55ab94a6fa652c71cdb119dc1b269c836672930 (diff)
Add --[no]diag-color options (infrastructure only)
Diffstat (limited to 'libbuild2/context.cxx')
-rw-r--r--libbuild2/context.cxx18
1 files changed, 15 insertions, 3 deletions
diff --git a/libbuild2/context.cxx b/libbuild2/context.cxx
index 967577f..c9f4340 100644
--- a/libbuild2/context.cxx
+++ b/libbuild2/context.cxx
@@ -204,10 +204,10 @@ namespace build2
//
set ("build.verbosity", uint64_t (verb));
- // Build system progress diagnostics.
+ // Build system diagnostics progress and color.
//
- // Note that it can be true, false, or NULL if progress was neither
- // requested nor suppressed.
+ // Note that these can be true, false, or NULL if neither requested nor
+ // suppressed explicitly.
//
{
value& v (gs.assign (vp.insert<bool> ("build.progress", v_g)));
@@ -215,6 +215,18 @@ namespace build2
v = *diag_progress_option;
}
+ {
+ value& v (gs.assign (vp.insert<bool> ("build.diag_color", v_g)));
+ if (diag_color_option)
+ v = *diag_color_option;
+ }
+
+ // These are the "effective" values that incorporate a suitable default
+ // if neither requested nor suppressed explicitly.
+ //
+ set ("build.show_progress", show_progress (verb_never));
+ set ("build.show_diag_color", show_diag_color ());
+
// Build system version (similar to what we do in the version module
// except here we don't include package epoch/revision).
//