diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-09-20 17:31:54 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-09-20 17:31:54 +0200 |
commit | cb5f269b13429f0e1ffbc41426227983e5ccaeba (patch) | |
tree | 14e4bd292e1a16ff3d844e73a466ab051f7345d7 /src/task.cc | |
parent | 41ce3a4dcf5a03588b7c350445e73975c6b12ff7 (diff) |
Simplify/fix task dependency calculation. And tasks unit-tests.
Diffstat (limited to 'src/task.cc')
-rw-r--r-- | src/task.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/task.cc b/src/task.cc index 962a02b..4cdfa5e 100644 --- a/src/task.cc +++ b/src/task.cc @@ -3,17 +3,15 @@ #include <unistd.h> #include <iostream> -Task::Task(const BuildConfiguration& config, - const std::vector<std::string>& depends) - : dependsStr(depends) - , config(config) +Task::Task(const BuildConfiguration& config) + : config(config) , output_system(config.system) { } int Task::registerDepTasks(const std::list<std::shared_ptr<Task>>& tasks) { - for(auto const& depStr : dependsStr) + for(const auto& depStr : depends()) { bool found{false}; for(const auto& task : tasks) |