diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-03-09 09:45:25 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-03-09 09:45:25 +0200 |
commit | fa6f9986dd73627643469c238b32dd92607f5214 (patch) | |
tree | de7ee1f4253ab815767b45c9ec0b03d802d01704 /build/scope | |
parent | 2e98d3ec3aa57c7b1776d3bf5e7e219a9a3cb3af (diff) |
Add support for skipping already loaded/included buildfiles at top level
The idea is that a buildfile shall be included/loaded only once for any
given out_root.
Diffstat (limited to 'build/scope')
-rw-r--r-- | build/scope | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/build/scope b/build/scope index b4f492d..e5c5fec 100644 --- a/build/scope +++ b/build/scope @@ -5,6 +5,8 @@ #ifndef BUILD_SCOPE #define BUILD_SCOPE +#include <unordered_set> + #include <build/path> #include <build/path-map> #include <build/variable> @@ -49,6 +51,12 @@ namespace build variable_map variables; prerequisite_set prerequisites; + // Set of buildfiles already loaded for this scope. The included + // buildfiles are checked against project root scope while + // imported -- against the overall root scope (root_scope). + // + std::unordered_set<path_type> buildfiles; + private: iterator i_; scope* parent_; |