aboutsummaryrefslogtreecommitdiff
path: root/build2/algorithm.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-03-03 14:33:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-03-03 15:25:32 +0200
commit183329b89ddf810e2df5c250ae5b97d8ebcbba74 (patch)
treebf1e174ffe0929a9ec78ac642b351cbc5a23b78b /build2/algorithm.ixx
parentbcb5045dff9e87decbad3a785eb1fe42f4fc1410 (diff)
Fix cli distribution via group
Diffstat (limited to 'build2/algorithm.ixx')
-rw-r--r--build2/algorithm.ixx13
1 files changed, 8 insertions, 5 deletions
diff --git a/build2/algorithm.ixx b/build2/algorithm.ixx
index 83aa050..e1f8ddc 100644
--- a/build2/algorithm.ixx
+++ b/build2/algorithm.ixx
@@ -129,8 +129,8 @@ namespace build2
return r;
}
- pair<const pair<const string, reference_wrapper<const rule>>&, action>
- match_impl (action, target&, const rule* skip);
+ pair<const pair<const string, reference_wrapper<const rule>>*, action>
+ match_impl (action, target&, const rule* skip, bool fail = true);
recipe
apply_impl (target&,
@@ -220,11 +220,14 @@ namespace build2
}
inline pair<recipe, action>
- match_delegate (action a, target& t, const rule& r)
+ match_delegate (action a, target& t, const rule& r, bool fail)
{
assert (phase == run_phase::match);
- auto mr (match_impl (a, t, &r));
- return make_pair (apply_impl (t, mr.first, mr.second), mr.second);
+ auto mr (match_impl (a, t, &r, fail));
+ return make_pair (mr.first != nullptr
+ ? apply_impl (t, *mr.first, mr.second)
+ : empty_recipe,
+ mr.second);
}
group_view