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/operation.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/operation.cxx')
-rw-r--r-- | build/config/operation.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/build/config/operation.cxx b/build/config/operation.cxx index 295a38a..abe4e22 100644 --- a/build/config/operation.cxx +++ b/build/config/operation.cxx @@ -101,13 +101,24 @@ namespace build { const variable& var (p.first->first); const value& val (p.first->second); + const string& n (var.name); // Skip special variables. // - if (var.name == "config.loaded" || - var.name == "config.configured") + if (n == "config.loaded" || + n == "config.configured") continue; + // We will only write config.*.configured if it is false + // (true is implied by its absence). + // + if (n.size () > 11 && + n.compare (n.size () - 11, 11, ".configured") == 0) + { + if (val == nullptr || as<bool> (val)) + continue; + } + // Warn the user if the value that we are saving differs // from the one they specified on the command line. // |