diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-01-11 10:14:23 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-01-12 10:58:19 +0200 |
commit | 9bf93c1ab73ee3cd2b763285fc5fc5456e972854 (patch) | |
tree | 0357c36e12fe2137ef6c9bd228e9d69bb2489a02 /build2/config/utility.cxx | |
parent | 33ed305eac57bff406fa3f672ba8acc4941e8f13 (diff) |
Implement support for narrowing down tests (config.test)
Diffstat (limited to 'build2/config/utility.cxx')
-rw-r--r-- | build2/config/utility.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/build2/config/utility.cxx b/build2/config/utility.cxx index dac11c2..7a3fa9c 100644 --- a/build2/config/utility.cxx +++ b/build2/config/utility.cxx @@ -14,7 +14,7 @@ namespace build2 { namespace config { - pair<const value*, bool> + pair<lookup, bool> omitted (scope& r, const variable& var) { // This is a stripped-down version of the required() twisted @@ -44,12 +44,12 @@ namespace build2 } if (l.defined () && current_mif->id == configure_id) - save_variable (r, var); + save_variable (r, var); - return pair<const value*, bool> (l.value, n); + return pair<lookup, bool> (l, n); } - const value& + lookup optional (scope& r, const variable& var) { if (current_mif->id == configure_id) @@ -57,8 +57,8 @@ namespace build2 auto l (r[var]); return l.defined () - ? *l - : r.assign (var); // NULL. + ? l + : lookup (r.assign (var), r); // NULL. } bool |