From f8a52e96685d636be956b5f89d6f493856c0810f Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 22 Jun 2021 17:51:15 +0200 Subject: Add option to print entire configure parameter database. --- libcppbuild.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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)) -- cgit v1.2.3