diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-04-06 11:26:52 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-04-06 13:51:56 +0200 |
commit | 76be0a35f6c37cda7ba65530330f1ac246fb52a8 (patch) | |
tree | f613ceafcf6c7208984d4536653061c4e0c23be7 /libbuild2/scope.hxx | |
parent | 0a9dd0c7d31cbba2170fdfda4b747a1fe5ce665a (diff) |
Add support for rule hints
A rule hint is a target attribute, for example:
[rule_hint=cxx] exe{hello}: c{hello}
Rule hints can be used to resolve ambiguity when multiple rules match the same
target as well as to override an unambiguous match.
Diffstat (limited to 'libbuild2/scope.hxx')
-rw-r--r-- | libbuild2/scope.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libbuild2/scope.hxx b/libbuild2/scope.hxx index 12fd22c..86f5e4b 100644 --- a/libbuild2/scope.hxx +++ b/libbuild2/scope.hxx @@ -422,9 +422,9 @@ namespace build2 template <typename T> void - insert_rule (action_id a, string hint, const rule& r) + insert_rule (action_id a, string name, const rule& r) { - rules.insert<T> (a, move (hint), r); + rules.insert<T> (a, move (name), r); } // 0 meta-operation id is treated as an (emulated) wildcard. @@ -435,7 +435,7 @@ namespace build2 // template <typename T> void - insert_rule (meta_operation_id, operation_id, string hint, const rule&); + insert_rule (meta_operation_id, operation_id, string name, const rule&); // Operation callbacks. // |