aboutsummaryrefslogtreecommitdiff
path: root/build2/b.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-12-16 14:14:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-12-16 14:14:15 +0200
commit530e8914ba00ce0e7ee89ba30d2b88f2c09f43c9 (patch)
tree0ca06c48d30ae06d8407da34bd02c57140b71062 /build2/b.cxx
parent44e1022f8141bd57756c2be4277c728ca7443eb3 (diff)
Split stream verbosity into components (path, extension)
Use to make sure structured result output always contains absolute target path.
Diffstat (limited to 'build2/b.cxx')
-rw-r--r--build2/b.cxx13
1 files changed, 7 insertions, 6 deletions
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);
}
}
}