diff options
-rw-r--r-- | src/libctor.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libctor.cc b/src/libctor.cc index 9860440..c7a7400 100644 --- a/src/libctor.cc +++ b/src/libctor.cc @@ -42,6 +42,7 @@ int main(int argc, char* argv[]) bool print_configure_db{false}; std::vector<std::string> add_files; std::vector<std::string> remove_files; + bool no_default_build{false}; // set to true to prevent empty arg list building 'all' target. bool list_files{false}; bool list_targets{false}; bool no_relaunch{false}; // true means no re-launch after rebuild. @@ -165,6 +166,7 @@ Options: if(list_files) { + no_default_build = true; std::set<std::string> files; for(std::size_t i = 0; i < numConfigFiles; ++i) { @@ -179,6 +181,7 @@ Options: if(!add_files.empty() || !remove_files.empty()) { + no_default_build = true; for(const auto& add_file : add_files) { reg(add_file.data(), [](){ return std::vector<BuildConfiguration>{};}); @@ -202,6 +205,7 @@ Options: if(list_targets) { + no_default_build = true; for(const auto& task : all_tasks) { if(task->targetType() != TargetType::Object) @@ -238,11 +242,13 @@ Options: if(print_configure_cmd) { + no_default_build = true; std::cout << getConfiguration("cmd") << "\n"; } if(print_configure_db) { + no_default_build = true; const auto& c = configuration(); for(const auto& config : c) { @@ -258,7 +264,7 @@ Options: } } - bool build_all{true}; + bool build_all{!no_default_build}; for(const auto& arg : opt.arguments()) { if(arg == "configure") |