From 9ca783f9fab41eac40b96313749533ea5c965426 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 28 Jun 2018 11:04:24 +0200 Subject: Add prerequisite variable visibility specification/enforcement --- build2/scope.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'build2/scope.cxx') 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); } -- cgit v1.1