From f7600f07eecbdac0a4400ca2bc39e3e9f5a53b1b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 8 Dec 2022 10:49:57 +0200 Subject: Add --[no]diag-color options (infrastructure only) --- libbuild2/context.cxx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'libbuild2/context.cxx') 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 ("build.progress", v_g))); @@ -215,6 +215,18 @@ namespace build2 v = *diag_progress_option; } + { + value& v (gs.assign (vp.insert ("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). // -- cgit v1.1