diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-31 09:01:50 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-31 09:01:50 +0200 |
commit | 6417a4e6af2b7732ec0da6af24f1a56f7cdada3f (patch) | |
tree | 58ffae7ef0cdac55acd6d498dfc66ce0967f4e9a /build2/test | |
parent | 31bd69c56bc29ec1c154a7c0623b6f0ccce78af1 (diff) |
Set part of variable override implementation
Diffstat (limited to 'build2/test')
-rw-r--r-- | build2/test/module.cxx | 14 | ||||
-rw-r--r-- | build2/test/rule.cxx | 17 |
2 files changed, 20 insertions, 11 deletions
diff --git a/build2/test/module.cxx b/build2/test/module.cxx index 10948ab..d5f6430 100644 --- a/build2/test/module.cxx +++ b/build2/test/module.cxx @@ -38,12 +38,14 @@ namespace build2 { auto& v (var_pool); - v.find<bool> ("test"); - v.find<name> ("test.input"); - v.find<name> ("test.output"); - v.find<name> ("test.roundtrip"); - v.find<strings> ("test.options"); - v.find<strings> ("test.arguments"); + // @@ OVR + + v.insert<bool> ("test"); + v.insert<name> ("test.input"); + v.insert<name> ("test.output"); + v.insert<name> ("test.roundtrip"); + v.insert<strings> ("test.options"); + v.insert<strings> ("test.arguments"); } } diff --git a/build2/test/rule.cxx b/build2/test/rule.cxx index 8c89bc7..063d148 100644 --- a/build2/test/rule.cxx +++ b/build2/test/rule.cxx @@ -66,9 +66,12 @@ namespace build2 { // See if there is a scope variable. // + // @@ I don't think we use this (e.g., test.exe = true) anymore. + // We now do exe{*}: test = true. + // if (!l.defined ()) l = t.base_scope ()[ - var_pool.find<bool> (string("test.") + t.type ().name)]; + var_pool.insert<bool> (string("test.") + t.type ().name)]; r = l && cast<bool> (l); } @@ -143,12 +146,14 @@ namespace build2 if (!il && !ol && !rl) { + // @@ Again, don't think we use this anymore. + // string n ("test."); n += t.type ().name; - const variable& in (var_pool.find<name> (n + ".input")); - const variable& on (var_pool.find<name> (n + ".output")); - const variable& rn (var_pool.find<name> (n + ".roundtrip")); + const variable& in (var_pool.insert<name> (n + ".input")); + const variable& on (var_pool.insert<name> (n + ".output")); + const variable& rn (var_pool.insert<name> (n + ".roundtrip")); // We should only keep value(s) that were specified together // in the innermost scope. @@ -288,11 +293,13 @@ namespace build2 if (!l) { + // @@ Again, don't think we do it. + // var.resize (5); var += t.type ().name; var += '.'; var += n; - l = t.base_scope ()[var_pool.find<strings> (var)]; + l = t.base_scope ()[var_pool.insert<strings> (var)]; } if (l) |