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/target.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'build2/cli/target.cxx') diff --git a/build2/cli/target.cxx b/build2/cli/target.cxx index 096295a..2fd70f7 100644 --- a/build2/cli/target.cxx +++ b/build2/cli/target.cxx @@ -23,8 +23,8 @@ namespace build2 &file::static_type, &target_factory, nullptr, /* fixed_extension */ - &target_extension_var, - &target_pattern_var, + &target_extension_var, + &target_pattern_var, nullptr, &file_search, false @@ -45,7 +45,8 @@ namespace build2 } static target* - cli_cxx_factory (const target_type&, dir_path d, dir_path o, string n) + cli_cxx_factory (context& ctx, + const target_type&, dir_path d, dir_path o, string n) { tracer trace ("cli::cli_cxx_factory"); @@ -55,11 +56,11 @@ namespace build2 // // Also required for the src-out remapping logic. // - targets.insert (d, o, n, trace); - targets.insert (d, o, n, trace); - targets.insert (d, o, n, trace); + ctx.targets.insert (d, o, n, trace); + ctx.targets.insert (d, o, n, trace); + ctx.targets.insert (d, o, n, trace); - return new cli_cxx (move (d), move (o), move (n)); + return new cli_cxx (ctx, move (d), move (o), move (n)); } const target_type cli_cxx::static_type -- cgit v1.1