From 76be0a35f6c37cda7ba65530330f1ac246fb52a8 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 6 Apr 2022 11:26:52 +0200 Subject: 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. --- libbuild2/scope.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libbuild2/scope.hxx') 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 void - insert_rule (action_id a, string hint, const rule& r) + insert_rule (action_id a, string name, const rule& r) { - rules.insert (a, move (hint), r); + rules.insert (a, move (name), r); } // 0 meta-operation id is treated as an (emulated) wildcard. @@ -435,7 +435,7 @@ namespace build2 // template 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. // -- cgit v1.1