diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-12-03 14:37:22 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-12-03 14:37:22 +0200 |
commit | 29f8159583d2b02efa2afeaa58082f57222c943d (patch) | |
tree | 1fa520de084c6c0dacc8af6525b58b294f1e9eae /build/config/utility.cxx | |
parent | 772b1e013bb0068d7347d0bbe2ff73c67358ee1b (diff) |
Add ability for module to remember that it is unconfigured
A module can set and then check the config.*.configured special variable
to false.
Diffstat (limited to 'build/config/utility.cxx')
-rw-r--r-- | build/config/utility.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/build/config/utility.cxx b/build/config/utility.cxx index c9d7c66..b81cb04 100644 --- a/build/config/utility.cxx +++ b/build/config/utility.cxx @@ -60,9 +60,18 @@ namespace build // for (scope* s (&r); s != nullptr; s = s->parent_scope ()) { - auto p (s->vars.find_namespace (ns)); - if (p.first != p.second) - return true; + for (auto p (s->vars.find_namespace (ns)); + p.first != p.second; + ++p.first) + { + const variable& var (p.first->first); + + // Ignore config.*.configured. + // + if (var.name.size () < 11 || + var.name.compare (var.name.size () - 11, 11, ".configured") != 0) + return true; + } } return false; |