summaryrefslogtreecommitdiff
path: root/libcppbuild.cc
diff options
context:
space:
mode:
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]()