summaryrefslogtreecommitdiff
path: root/libcppbuild.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-06-12 16:16:41 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2021-06-12 16:16:41 +0200
commit6bcbf18a6a67707c13d66b96770c8b210a45b9f4 (patch)
treebbbc866f84df2985db6ca8719884e4fb09fd10cf /libcppbuild.cc
parent889106af4d8381ac188a6532625e2c642150220f (diff)
Skip non-dirty tasks.
Diffstat (limited to 'libcppbuild.cc')
-rw-r--r--libcppbuild.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/libcppbuild.cc b/libcppbuild.cc
index 3cba49f..82a70d1 100644
--- a/libcppbuild.cc
+++ b/libcppbuild.cc
@@ -38,7 +38,7 @@ int main(int argc, const char* argv[])
for(const auto& file : files)
{
tasks.emplace_back(config, settings, file);
- objects.push_back(tasks.back().targetFile);
+ objects.push_back(tasks.back().target());
}
if(argc == 2 && std::string(argv[1]) == "clean")
@@ -69,6 +69,12 @@ int main(int argc, const char* argv[])
while(processes.size() < settings.parallel_processes &&
task != tasks.end())
{
+ if(!task->dirty())
+ {
+ ++task;
+ continue;
+ }
+
processes.emplace_back(
std::async(std::launch::async,
[task]()