aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-04-06 07:43:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-04-06 07:43:04 +0200
commita1ee4e9205497e44f211578aa8dd9e0758d19a0e (patch)
treea3502853cd7ed29e7712534bd32983922403268b
parent77e7dc1ac70976e39f2bd3bb91f49ab1f25ef524 (diff)
Set src/out_path on global_scope
-rw-r--r--build2/context.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/build2/context.cxx b/build2/context.cxx
index 6317476..02faee0 100644
--- a/build2/context.cxx
+++ b/build2/context.cxx
@@ -76,8 +76,14 @@ namespace build2
// On POSIX, however, this is a real path. See the comment in
// <build2/path-map> for details.
//
- scope& gs (*scopes.insert (dir_path ("/"), nullptr, true, false)->second);
- global_scope = &gs;
+ {
+ auto i (scopes.insert (dir_path ("/"), nullptr, true, false));
+ global_scope = i->second;
+ global_scope->out_path_ = global_scope->src_path_ = &i->first;
+ }
+
+ scope& gs (*global_scope);
+
// Parse and enter the command line variables. We do it before entering
// any other variables so that all the variables that are overriden are