aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/dist
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/dist
parentfc4bea587f91e503ab26d15b76ab1e3bf88672b1 (diff)
Cache subprojects variable value in scope::root_extra
Diffstat (limited to 'libbuild2/dist')
-rw-r--r--libbuild2/dist/operation.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/libbuild2/dist/operation.cxx b/libbuild2/dist/operation.cxx
index 8dd8a6e..cce2239 100644
--- a/libbuild2/dist/operation.cxx
+++ b/libbuild2/dist/operation.cxx
@@ -232,9 +232,9 @@ namespace build2
// The same for 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);
@@ -373,9 +373,9 @@ namespace build2
const scope* srs (rs);
const module::callbacks* cbs (&mod.callbacks_);
- 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);
if (dl.sub (pd))