summaryrefslogtreecommitdiff
path: root/src/task.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2024-12-23 12:14:46 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2024-12-25 21:48:03 +0100
commit3b8b519380651738a9d725353535d8141e7fa7ce (patch)
treeb248f001c1acbe04137efe6b89b06f73467722b5 /src/task.cc
parent78c5477b3989d67169de2d05665adfb801caab23 (diff)
WIP
Diffstat (limited to 'src/task.cc')
-rw-r--r--src/task.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/task.cc b/src/task.cc
index a9c0fee..ef7731b 100644
--- a/src/task.cc
+++ b/src/task.cc
@@ -3,7 +3,6 @@
// See accompanying file LICENSE for details.
#include "task.h"
-#include <unistd.h>
#include <iostream>
#include <algorithm>
#include <utility>
@@ -46,11 +45,14 @@ int Task::registerDepTasks(const std::vector<std::shared_ptr<Task>>& tasks)
bool Task::operator==(const std::string& depStr)
{
+ std::filesystem::path generated_output = sourceDir;
+ generated_output /= target();
return
- name() == depStr ||
- target() == depStr ||
- sourceDir + "/" + target() == depStr ||
- targetFile().string() == depStr
+ (!derived() && name() == depStr) || // compare to name
+ (!derived() && config.target == depStr) || // compare to stated target (ex. foo.a)
+ target() == depStr || // compare to derived (derived to foo.lib on msvc)
+ generated_output == depStr || // not sure what this is for?!
+ targetFile().string() == depStr // compare to target output file
;
}