diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-09-24 11:00:16 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-09-24 11:00:16 +0200 |
commit | c94f066bbd47520cf52937fc4ad08a699abda28a (patch) | |
tree | a0b7f0bcf013377e2e78b96997176b00bc6f45d4 /libbuild2/config/utility.hxx | |
parent | a414fa7b0ff469013598ca9ef2999ca6293ee7c1 (diff) |
Add ability to ignore extra variables in specified_config()
Diffstat (limited to 'libbuild2/config/utility.hxx')
-rw-r--r-- | libbuild2/config/utility.hxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libbuild2/config/utility.hxx b/libbuild2/config/utility.hxx index 7d3e18b..0429555 100644 --- a/libbuild2/config/utility.hxx +++ b/libbuild2/config/utility.hxx @@ -347,10 +347,20 @@ namespace build2 // Note that this function detects and ignores special config.* variables // (such as config.*.configured) which may be used by a module to remember // that it is unconfigured (e.g., in order to avoid re-running the tests, - // etc; see below). + // 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>. // LIBBUILD2_SYMEXPORT bool - specified_config (scope& rs, const string& var); + specified_config (scope& rs, + const string& var, + initializer_list<const char*> ignore); + + inline bool + specified_config (scope& rs, const string& var) + { + return specified_config (rs, var, {}); + } // Check if there is a false config.*.configured value. This mechanism can // be used to "remember" that the module is left unconfigured in order to |