aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/algorithm.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-04-24 10:32:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-04-27 09:24:07 +0200
commitab93dccd5806de95b9123ec6c2272847ca0ae592 (patch)
tree922a4a586a8273c67adaf56dddaae8e79d3a0c78 /libbuild2/algorithm.ixx
parent56499cc66ca248029aa584fe9f5de04eeb24702f (diff)
Add inject() for injecting additional dependencies during match
Diffstat (limited to 'libbuild2/algorithm.ixx')
-rw-r--r--libbuild2/algorithm.ixx7
1 files changed, 7 insertions, 0 deletions
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*);