summaryrefslogtreecommitdiff
path: root/src/build.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2022-06-07 18:06:57 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2022-06-09 22:20:31 +0200
commitdafd592cf44c184f9d24e2216bbed5c23e4b23c2 (patch)
treee94ab4c49ec4486e3a8e91c04cbba73a221d54c7 /src/build.cc
parent80db51ae3f7d5fbfb52eee4505f615ea4edba62d (diff)
Refactor the way task names are looked up.
Diffstat (limited to 'src/build.cc')
-rw-r--r--src/build.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/build.cc b/src/build.cc
index b0b4d06..cb830ac 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -162,13 +162,7 @@ int build(const Settings& settings,
bool task_found{false};
for(auto task : all_tasks)
{
- if(task->target() == name || // match exact target output (ex. build/foo.o)
-
- (!task->derived() && // if non-derived task:
- ( task->buildConfig().target == name || // match name
- task->buildConfig().name == name ) // or target
- )
- )
+ if(*task == name)
{
task_found = true;