From ec203677f1de13c200e54813db73a8ed5be8d4c9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 12 Jul 2020 09:58:44 +0200 Subject: Cache subprojects variable value in scope::root_extra --- build2/b.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build2') diff --git a/build2/b.cxx b/build2/b.cxx index 61cb931..4e9ebf7 100644 --- a/build2/b.cxx +++ b/build2/b.cxx @@ -1103,9 +1103,9 @@ main (int argc, char* argv[]) // Note that the subprojects variable has already been processed // and converted to a map by the bootstrap_src() call above. // - if (auto l = rs.vars[ctx->var_subprojects]) + if (const subprojects* ps = *rs.root_extra->subprojects) { - for (const auto& p: cast (l)) + for (const auto& p: *ps) { if (out_base.sub (out_root / p.second)) fail << tn << " is in a subproject of " << out_root << -- cgit v1.1