From c5d8a9cf5137c3272cab4981eeff97c16304de95 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 17 Oct 2023 15:01:53 +0200 Subject: Add notion of match options Now, when matching a rule, the caller may request a subset of the full functionality of performing an operation on a target. This is achieved with match options. --- libbuild2/operation.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'libbuild2/operation.cxx') diff --git a/libbuild2/operation.cxx b/libbuild2/operation.cxx index 4af03fe..7b6dc3c 100644 --- a/libbuild2/operation.cxx +++ b/libbuild2/operation.cxx @@ -330,7 +330,10 @@ namespace build2 const target& t (ts[i].as ()); l5 ([&]{trace << diag_doing (a, t);}); - target_state s (match_async (a, t, 0, task_count, false)); + target_state s (match_async (a, t, + 0, task_count, + match_extra::all_options, + false /* fail */)); // Bail out if the target has failed and we weren't instructed to // keep going. @@ -382,7 +385,9 @@ namespace build2 // for (const target* pt: p.prerequisite_targets) { - target_state s (match_direct_sync (a, *pt, false /* fail */)); + target_state s (match_direct_sync (a, *pt, + match_extra::all_options, + false /* fail */)); if (s == target_state::failed) { @@ -419,7 +424,7 @@ namespace build2 target_state s; if (j < i) { - s = match_complete (a, t, false); + s = match_complete (a, t, match_extra::all_options, false /* fail */); if (posthoc_fail) s = /*t.state[a].state =*/ target_state::failed; -- cgit v1.1