aboutsummaryrefslogtreecommitdiff
path: root/build2/prerequisite.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-04-19 09:24:38 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-04-19 15:25:50 +0200
commitfc18a6dc1fcb02b505f07914e484cebbaf268698 (patch)
tree2cb9b04c5924dfd46e7d934912b41c3efd894a93 /build2/prerequisite.cxx
parentae20570f2ad55b2fa8e71cf450457cb9c4b21b1b (diff)
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.
Diffstat (limited to 'build2/prerequisite.cxx')
-rw-r--r--build2/prerequisite.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/build2/prerequisite.cxx b/build2/prerequisite.cxx
index e28d082..4adfc92 100644
--- a/build2/prerequisite.cxx
+++ b/build2/prerequisite.cxx
@@ -52,6 +52,7 @@ namespace build2
insert (const string* proj,
const target_type& tt,
dir_path dir,
+ dir_path out,
string name,
const string* ext,
scope& s,
@@ -62,11 +63,13 @@ namespace build2
// Find or insert.
//
- auto r (emplace (proj, tt, move (dir), move (name), ext, s));
+ auto r (emplace (proj, tt, move (dir), move (out), move (name), ext, s));
prerequisite& p (const_cast<prerequisite&> (*r.first));
// Update extension if the existing prerequisite has it unspecified.
//
+ // @@ Changing the key!
+ //
if (p.ext != ext)
{
l5 ([&]{