diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-11-20 09:25:50 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-11-20 09:25:50 +0200 |
commit | aec6628e8c1f0ebdb87767cbf804b01504d82459 (patch) | |
tree | 5d761b889e7c3ae9043112f777142612b14fd4b2 /libbuild2/config/utility.hxx | |
parent | bbf670d03ee587b0794f77a39db801bad6459ca5 (diff) |
Generalize config::specified_config()
Diffstat (limited to 'libbuild2/config/utility.hxx')
-rw-r--r-- | libbuild2/config/utility.hxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/libbuild2/config/utility.hxx b/libbuild2/config/utility.hxx index 3b67c6c..57f253f 100644 --- a/libbuild2/config/utility.hxx +++ b/libbuild2/config/utility.hxx @@ -506,17 +506,23 @@ namespace build2 // that it is unconfigured (e.g., in order to avoid re-running the tests, // etc; see below). Additional variables (e.g., unsaved) can be ignored // with the third argument. If specified, it should contain the part(s) - // after config.<name>. + // after the namespace (config.<name>). + // + // Note that <name> may include several components (separated with `.`). + // And you can request the exact match rather than the prefix. + // + // Note: unlike the above functions, can be called from any phase. // LIBBUILD2_SYMEXPORT bool - specified_config (scope& rs, - const string& var, - initializer_list<const char*> ignore); + specified_config (const scope& rs, + const string& ns, + initializer_list<const char*> ignore, + bool exact = false); inline bool - specified_config (scope& rs, const string& var) + specified_config (const scope& rs, const string& ns, bool exact = false) { - return specified_config (rs, var, {}); + return specified_config (rs, ns, {}, exact); } // Check if there is a false config.*.configured value. This mechanism can |