From 5035f4ef68922ac758b1e4734e67d73c9228010b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 22 Aug 2019 14:38:57 +0200 Subject: Introduce notion of build context All non-const global state is now in class context and we can now have multiple independent builds going on at the same time. --- build2/cli/rule.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'build2/cli/rule.cxx') diff --git a/build2/cli/rule.cxx b/build2/cli/rule.cxx index f6bebee..4ccafc9 100644 --- a/build2/cli/rule.cxx +++ b/build2/cli/rule.cxx @@ -112,7 +112,7 @@ namespace build2 // Check if there is a corresponding cli.cxx{} group. // - const cli_cxx* g (targets.find (t.dir, t.out, t.name)); + const cli_cxx* g (t.ctx.targets.find (t.dir, t.out, t.name)); // If not or if it has no prerequisites (happens when we use it to // set cli.options) and this target has a cli{} prerequisite, then @@ -124,7 +124,7 @@ namespace build2 prerequisite_members (a, t))) { if (g == nullptr) - g = &targets.insert (t.dir, t.out, t.name, trace); + g = &t.ctx.targets.insert (t.dir, t.out, t.name, trace); g->prerequisites (prerequisites {p->as_prerequisite ()}); } @@ -322,7 +322,7 @@ namespace build2 else if (verb) text << "cli " << s; - if (!dry_run) + if (!t.ctx.dry_run) { run (cli, args); dd.check_mtime (tp); -- cgit v1.1