summaryrefslogtreecommitdiff
path: root/src/libctor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libctor.cc')
-rw-r--r--src/libctor.cc21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/libctor.cc b/src/libctor.cc
index 4d0d6d9..ca60de2 100644
--- a/src/libctor.cc
+++ b/src/libctor.cc
@@ -26,19 +26,19 @@
#include "tasks.h"
#include "build.h"
#include "unittest.h"
+
int main(int argc, char* argv[])
{
- if(argc > 1 && std::string(argv[1]) == "configure")
- {
- return configure(argc, argv);
- }
-
Settings settings{};
- settings.builddir = getConfiguration(cfg::builddir, "build");
+ settings.builddir = getConfiguration(cfg::builddir, settings.builddir);
settings.parallel_processes =
std::max(1u, std::thread::hardware_concurrency() * 2 - 1);
- settings.verbose = 0;
+
+ if(argc > 1 && std::string(argv[1]) == "configure")
+ {
+ return configure(settings, argc, argv);
+ }
bool write_compilation_database{false};
std::string compilation_database;
@@ -85,6 +85,13 @@ int main(int argc, char* argv[])
return 0;
});
+ opt.add("quiet", no_argument, 'q',
+ "Be completely silent.",
+ [&]() {
+ settings.verbose = -1;
+ return 0;
+ });
+
opt.add("add", required_argument, 'a',
"Add specified file to the build configurations.",
[&]() {