From 4f77a82425f60ff928880048dfa79fdd6fba56d8 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 16 Jan 2025 18:16:27 +0100 Subject: Add cyclic dependency detection. --- src/build.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/build.h') 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& targets, const std::vector>& all_tasks, bool dryrun = false); + +// Recursively build vector of dependency tasks from source task. +// Throws if a cycle is detected. +std::vector> getDepTasks(std::shared_ptr task, + std::vector> trace = {}); -- cgit v1.2.3