aboutsummaryrefslogtreecommitdiff
path: root/bdep/utility.txx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-01-24 21:41:48 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-01-25 15:16:58 +0300
commit18bb25efa41dab4a3f7619040e2067da3533decd (patch)
tree822bd06dd0a9d5568c14862592d310fec1012b58 /bdep/utility.txx
parenta4dabaa6db8806f23bb7d7bdbb95cab456ef3a73 (diff)
Add support for --no-progress option
Diffstat (limited to 'bdep/utility.txx')
-rw-r--r--bdep/utility.txx19
1 files changed, 19 insertions, 0 deletions
diff --git a/bdep/utility.txx b/bdep/utility.txx
index 4686ba2..2927002 100644
--- a/bdep/utility.txx
+++ b/bdep/utility.txx
@@ -2,6 +2,7 @@
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
+#include <cstring> // strcmp()
#include <iostream> // cin
#include <bdep/diagnostics.hxx>
@@ -91,6 +92,7 @@ namespace bdep
string vl;
{
const char* o (nullptr);
+ bool progress (!co.no_progress ());
switch (verb)
{
@@ -106,7 +108,15 @@ namespace bdep
}
if (o != nullptr)
+ {
ops.push_back (o);
+
+ if (strcmp (o, "-q") == 0)
+ progress = true; // No need to suppress (already done with -q).
+ }
+
+ if (!progress)
+ ops.push_back ("--no-progress");
}
// Forward our --build* options.
@@ -180,6 +190,7 @@ namespace bdep
string vl;
{
const char* o (nullptr);
+ bool progress (!co.no_progress ());
switch (verb)
{
@@ -195,7 +206,15 @@ namespace bdep
}
if (o != nullptr)
+ {
ops.push_back (o);
+
+ if (strcmp (o, "-q") == 0)
+ progress = true; // No need to suppress (already done with -q).
+ }
+
+ if (!progress)
+ ops.push_back ("--no-progress");
}
return process_start_callback (