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/variable.cxx | |
parent | 3cc5e3bd441fc9d18fece3d9e99fae75c78438e7 (diff) |
Add prerequisite variable visibility specification/enforcement
Diffstat (limited to 'build2/variable.cxx')
-rw-r--r-- | build2/variable.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/build2/variable.cxx b/build2/variable.cxx index 0c07db6..406123d 100644 --- a/build2/variable.cxx +++ b/build2/variable.cxx @@ -13,6 +13,25 @@ using namespace std; namespace build2 { + // variable_visibility + // + ostream& + operator<< (ostream& o, variable_visibility v) + { + const char* s (nullptr); + + switch (v) + { + case variable_visibility::normal: s = "normal"; break; + case variable_visibility::project: s = "project"; break; + case variable_visibility::scope: s = "scope"; break; + case variable_visibility::target: s = "target"; break; + case variable_visibility::prereq: s = "prerequisite"; break; + } + + return o << s; + } + // value // void value:: |