aboutsummaryrefslogtreecommitdiff
path: root/build/diagnostics
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-04-02 11:53:01 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-04-02 11:53:01 +0200
commit626348009e74d2ec6e9f500d27f60728b4fc81df (patch)
tree9d56bf2d091abb2a7e99876d1184895e8b6fb4bb /build/diagnostics
parente0de4f26fcf598b4f6beaa2847c4d43a4c761f5b (diff)
Add command line option to set verbosity level
-v sets it to 1 (shows actual command lines) --verbose sets it to any value in the 0-5 range
Diffstat (limited to 'build/diagnostics')
-rw-r--r--build/diagnostics5
1 files changed, 4 insertions, 1 deletions
diff --git a/build/diagnostics b/build/diagnostics
index 68f449b..21e02e2 100644
--- a/build/diagnostics
+++ b/build/diagnostics
@@ -49,13 +49,16 @@ namespace build
// Trace verbosity level.
//
+ // 0 - tracing disabled.
// 1 - command lines to update explicit targets (e.g., .o)
// 2 - command lines to update implicit targets (e.g., .d)
// 3 - things didn't work out (e.g., rule did not match)
// 4 - additional information
// 5 - more additional information
//
- extern std::uint8_t verb;
+ // While uint8 is more than enough, use uint16 for the ease of printing.
+ //
+ extern std::uint16_t verb;
template <typename F> inline void level1 (const F& f) {if (verb >= 1) f ();}
template <typename F> inline void level2 (const F& f) {if (verb >= 2) f ();}