From fc18a6dc1fcb02b505f07914e484cebbaf268698 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 19 Apr 2016 09:24:38 +0200 Subject: Redesign src/out scoping We no longer enter paths from the src tree into scope map. Instead, targets from the src tree now include their out tree directory (in essence their "configuration"). This is then used to find a target's scope. See the comment in class target for details. The result of this change is that we can now again build multiple configurations (out trees) for same project at once. --- build2/cli/target.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'build2/cli/target.cxx') diff --git a/build2/cli/target.cxx b/build2/cli/target.cxx index 44d1a9a..52ddd17 100644 --- a/build2/cli/target.cxx +++ b/build2/cli/target.cxx @@ -49,7 +49,11 @@ namespace build2 } static target* - cli_cxx_factory (const target_type&, dir_path d, string n, const string* e) + cli_cxx_factory (const target_type&, + dir_path d, + dir_path o, + string n, + const string* e) { tracer trace ("cli::cli_cxx_factory"); @@ -58,11 +62,11 @@ namespace build2 // src_base if the buildfile mentions some of them explicitly // as prerequisites. // - targets.insert (d, n, trace); - targets.insert (d, n, trace); - targets.insert (d, n, trace); + targets.insert (d, o, n, trace); + targets.insert (d, o, n, trace); + targets.insert (d, o, n, trace); - return new cli_cxx (move (d), move (n), e); + return new cli_cxx (move (d), move (o), move (n), e); } const target_type cli_cxx::static_type -- cgit v1.1