From 18bb25efa41dab4a3f7619040e2067da3533decd Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 24 Jan 2019 21:41:48 +0300 Subject: Add support for --no-progress option --- bdep/utility.txx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'bdep/utility.txx') 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 // strcmp() #include // cin #include @@ -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 ( -- cgit v1.1