From 0931b80defeffb6b36257ec5f279d661c17fe969 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 19 Jun 2021 14:57:03 +0200 Subject: Exit earlier if there is no work to do. --- libcppbuild.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libcppbuild.cc b/libcppbuild.cc index f641a90..f575a52 100644 --- a/libcppbuild.cc +++ b/libcppbuild.cc @@ -165,7 +165,7 @@ void recompileCheck(const Settings& settings, int argc, char* argv[]) { args.push_back(argv[i]); } - exit(execute(argv[0], args)); + exit(execute(argv[0], args, settings.verbose)); } } } @@ -278,6 +278,11 @@ int main(int argc, char* argv[]) } } + if(dirtyTasks.empty()) + { + return 0; + } + std::cout << "Building\n"; std::list> processes; -- cgit v1.2.3