diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-06-28 11:04:24 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-06-28 11:04:24 +0200 |
commit | 9ca783f9fab41eac40b96313749533ea5c965426 (patch) | |
tree | cf1ee86bc0153fb972e99dc882b4d1823805725b /build2/scope.cxx | |
parent | 3cc5e3bd441fc9d18fece3d9e99fae75c78438e7 (diff) |
Add prerequisite variable visibility specification/enforcement
Diffstat (limited to 'build2/scope.cxx')
-rw-r--r-- | build2/scope.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/build2/scope.cxx b/build2/scope.cxx index ff004b5..dc08925 100644 --- a/build2/scope.cxx +++ b/build2/scope.cxx @@ -23,6 +23,9 @@ namespace build2 size_t d (0); + if (var.visibility == variable_visibility::prereq) + return make_pair (lookup (), d); + // Process target type/pattern-specific prepend/append values. // auto pre_app = [&var] (lookup& l, @@ -164,6 +167,8 @@ namespace build2 case variable_visibility::normal: s = s->parent_scope (); break; + case variable_visibility::prereq: + assert (false); } } @@ -247,6 +252,7 @@ namespace build2 case variable_visibility::normal: break; case variable_visibility::target: + case variable_visibility::prereq: assert (false); } |