aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/scope.hxx
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/scope.hxx
parentfc4bea587f91e503ab26d15b76ab1e3bf88672b1 (diff)
Cache subprojects variable value in scope::root_extra
Diffstat (limited to 'libbuild2/scope.hxx')
-rw-r--r--libbuild2/scope.hxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/libbuild2/scope.hxx b/libbuild2/scope.hxx
index 48731dc..25657a3 100644
--- a/libbuild2/scope.hxx
+++ b/libbuild2/scope.hxx
@@ -27,6 +27,11 @@ namespace build2
{
class dir;
+ using subprojects = std::map<project_name, dir_path>;
+
+ LIBBUILD2_SYMEXPORT ostream&
+ operator<< (ostream&, const subprojects&); // Print as name@dir sequence.
+
class LIBBUILD2_SYMEXPORT scope
{
public:
@@ -429,6 +434,12 @@ namespace build2
//
optional<const dir_path*> amalgamation;
+ // This project's subprojects (var_subprojects value). Absent means it
+ // is not yet determined (happens at the end of bootstrap_src()). NULL
+ // means there are no subprojects.
+ //
+ optional<const build2::subprojects*> subprojects;
+
bool altn; // True if using alternative build file/directory naming.
// Build file/directory naming scheme used by this project.