diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-06-22 17:51:15 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-06-22 17:51:15 +0200 |
commit | f8a52e96685d636be956b5f89d6f493856c0810f (patch) | |
tree | c605c3f240ca8dd3d32445fefb2fafe6becac542 | |
parent | b25810b9668abe8f7cc7db24326a98c1b017966e (diff) |
Add option to print entire configure parameter database.
-rw-r--r-- | libcppbuild.cc | 18 |
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)) |