From ab93dccd5806de95b9123ec6c2272847ca0ae592 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 24 Apr 2020 10:32:21 +0200 Subject: Add inject() for injecting additional dependencies during match --- libbuild2/algorithm.ixx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libbuild2/algorithm.ixx') diff --git a/libbuild2/algorithm.ixx b/libbuild2/algorithm.ixx index 9c656fd..c421218 100644 --- a/libbuild2/algorithm.ixx +++ b/libbuild2/algorithm.ixx @@ -476,6 +476,13 @@ namespace build2 return t.group; } + inline void + inject (action a, target& t, const target& p) + { + match (a, p); + t.prerequisite_targets[a].emplace_back (&p); + } + LIBBUILD2_SYMEXPORT void match_prerequisites (action, target&, const match_search&, const scope*); -- cgit v1.1