diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-04-24 10:32:21 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-04-27 09:24:07 +0200 |
commit | ab93dccd5806de95b9123ec6c2272847ca0ae592 (patch) | |
tree | 922a4a586a8273c67adaf56dddaae8e79d3a0c78 /libbuild2/algorithm.ixx | |
parent | 56499cc66ca248029aa584fe9f5de04eeb24702f (diff) |
Add inject() for injecting additional dependencies during match
Diffstat (limited to 'libbuild2/algorithm.ixx')
-rw-r--r-- | libbuild2/algorithm.ixx | 7 |
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*); |