From a1ee4e9205497e44f211578aa8dd9e0758d19a0e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 6 Apr 2016 07:43:04 +0200 Subject: Set src/out_path on global_scope --- build2/context.cxx | 10 ++++++++-- 1 file 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 // 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 -- cgit v1.1