summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-06-22 20:15:19 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2021-06-22 20:15:19 +0200
commit68bf2848332fd15a2b6dfa49f3a58fccd899dbd7 (patch)
treeb9e740a983c7c033766e0a721e298ba0bb4b4414
parent8a35724397e84e9d23a44a4f2d3a3e73fe25d9e7 (diff)
Setting V env variable overloads the verbosity.
-rw-r--r--libcppbuild.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/libcppbuild.cc b/libcppbuild.cc
index 7280910..2a2c40d 100644
--- a/libcppbuild.cc
+++ b/libcppbuild.cc
@@ -12,6 +12,7 @@
#include <array>
#include <deque>
#include <fstream>
+#include <cstdlib>
#include <set>
#include <getoptpp/getoptpp.hpp>
@@ -527,6 +528,12 @@ int main(int argc, char* argv[])
opt.process(argc, argv);
+ auto verbose_env = std::getenv("V");
+ if(verbose_env)
+ {
+ settings.verbose = std::atoi(verbose_env);
+ }
+
if(list_files)
{
std::set<std::string> files;