diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2025-01-16 18:16:27 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2025-01-16 19:36:15 +0100 |
commit | 4f77a82425f60ff928880048dfa79fdd6fba56d8 (patch) | |
tree | 96d810deff9dbafae4f94748fa68dbbc701f3b35 /src/build.h | |
parent | c50b7554cfd23b53107f2a2917a0be22a68b0c11 (diff) |
Add cyclic dependency detection.develop
Diffstat (limited to 'src/build.h')
-rw-r--r-- | src/build.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/build.h b/src/build.h index 500fb7f..7296f76 100644 --- a/src/build.h +++ b/src/build.h @@ -33,3 +33,8 @@ int build(const ctor::settings& settings, const std::vector<Target>& targets, const std::vector<std::shared_ptr<Task>>& all_tasks, bool dryrun = false); + +// Recursively build vector of dependency tasks from source task. +// Throws if a cycle is detected. +std::vector<std::shared_ptr<Task>> getDepTasks(std::shared_ptr<Task> task, + std::vector<std::shared_ptr<Task>> trace = {}); |