summaryrefslogtreecommitdiff
path: root/libcppbuild.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-06-19 14:57:03 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2021-06-19 14:57:03 +0200
commit0931b80defeffb6b36257ec5f279d661c17fe969 (patch)
tree1d45b80f9fa92bdb0a2cda99d47edd607e4bf8f1 /libcppbuild.cc
parent1585cf0bab4fc20dd999b40da3a91d298dcbcdb8 (diff)
Exit earlier if there is no work to do.
Diffstat (limited to 'libcppbuild.cc')
-rw-r--r--libcppbuild.cc7
1 files changed, 6 insertions, 1 deletions
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<std::future<int>> processes;