From 530e8914ba00ce0e7ee89ba30d2b88f2c09f43c9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 16 Dec 2017 14:14:15 +0200 Subject: Split stream verbosity into components (path, extension) Use to make sure structured result output always contains absolute target path. --- build2/b.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'build2/b.cxx') diff --git a/build2/b.cxx b/build2/b.cxx index 0d88f5f..7bb9484 100644 --- a/build2/b.cxx +++ b/build2/b.cxx @@ -105,16 +105,17 @@ namespace build2 // Let's go with the portable one for now and see how it goes (we // can always add a format version, e.g., --structured-result=2). - // Set the stream verbosity to 0 to suppress extension printing by - // default (this can still be overriden by the target type's print - // function as is the case for file{}, for example). + // Set the stream extension verbosity to 0 to suppress extension + // printing by default (this can still be overriden by the target + // type's print function as is the case for file{}, for example). + // And set the path verbosity to 1 to always print absolute. // - uint16_t v (stream_verb (cout)); - stream_verb (cout, 0); + stream_verbosity sv (stream_verb (cout)); + stream_verb (cout, stream_verbosity (1, 0)); cout << ' ' << at.as_target () << endl; - stream_verb (cout, v); + stream_verb (cout, sv); } } } -- cgit v1.1