summaryrefslogtreecommitdiff
path: root/libcppbuild.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libcppbuild.cc')
-rw-r--r--libcppbuild.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/libcppbuild.cc b/libcppbuild.cc
index 5cd4dc9..5e63029 100644
--- a/libcppbuild.cc
+++ b/libcppbuild.cc
@@ -409,6 +409,7 @@ int main(int argc, char* argv[])
bool write_compilation_database{false};
std::string compilation_database;
bool print_configure_cmd{false};
+ bool print_configure_db{false};
dg::Options opt;
int key{256};
@@ -450,6 +451,13 @@ int main(int argc, char* argv[])
return 0;
});
+ opt.add("configure-db", no_argument, key++,
+ "Print entire configure parameter database.",
+ [&]() {
+ print_configure_db = true;
+ return 0;
+ });
+
opt.add("database", required_argument, 'd',
"Write compilation database json file.",
[&]() {
@@ -507,6 +515,16 @@ int main(int argc, char* argv[])
return 0;
}
+ if(print_configure_db)
+ {
+ const auto& c = configuration();
+ for(const auto& config : c)
+ {
+ std::cout << config.first << ": " << config.second << "\n";
+ }
+ return 0;
+ }
+
for(auto task : tasks)
{
if(task->registerDepTasks(tasks))