aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/config
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-07-12 09:58:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-07-12 09:58:44 +0200
commitec203677f1de13c200e54813db73a8ed5be8d4c9 (patch)
tree537f98ff676a6cbc7210e0a7d4fd3ba301882486 /libbuild2/config
parentfc4bea587f91e503ab26d15b76ab1e3bf88672b1 (diff)
Cache subprojects variable value in scope::root_extra
Diffstat (limited to 'libbuild2/config')
-rw-r--r--libbuild2/config/operation.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/libbuild2/config/operation.cxx b/libbuild2/config/operation.cxx
index 6e28b0a..c606d09 100644
--- a/libbuild2/config/operation.cxx
+++ b/libbuild2/config/operation.cxx
@@ -592,9 +592,9 @@ namespace build2
// Configure subprojects that have been loaded.
//
- if (auto l = rs.vars[ctx.var_subprojects])
+ if (const subprojects* ps = *rs.root_extra->subprojects)
{
- for (auto p: cast<subprojects> (l))
+ for (auto p: *ps)
{
const dir_path& pd (p.second);
dir_path out_nroot (out_root / pd);
@@ -633,9 +633,9 @@ namespace build2
// Configure subprojects. Since we don't load buildfiles if configuring
// a forward, we do it for all known subprojects.
//
- if (auto l = rs.vars[ctx.var_subprojects])
+ if (const subprojects* ps = *rs.root_extra->subprojects)
{
- for (auto p: cast<subprojects> (l))
+ for (auto p: *ps)
{
dir_path out_nroot (out_root / p.second);
const scope& nrs (ctx.scopes.find (out_nroot));
@@ -860,9 +860,9 @@ namespace build2
// Disfigure subprojects. Since we don't load buildfiles during
// disfigure, we do it for all known subprojects.
//
- if (auto l = rs.vars[ctx.var_subprojects])
+ if (const subprojects* ps = *rs.root_extra->subprojects)
{
- for (auto p: cast<subprojects> (l))
+ for (auto p: *ps)
{
const dir_path& pd (p.second);
dir_path out_nroot (out_root / pd);
@@ -962,9 +962,9 @@ namespace build2
bool r (false);
- if (auto l = rs.vars[ctx.var_subprojects])
+ if (const subprojects* ps = *rs.root_extra->subprojects)
{
- for (auto p: cast<subprojects> (l))
+ for (auto p: *ps)
{
dir_path out_nroot (out_root / p.second);
const scope& nrs (ctx.scopes.find (out_nroot));