diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-06-27 16:59:09 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-06-27 16:59:09 +0200 |
commit | 41cad5bba8a718a0403c0578660c60e81c9f46e4 (patch) | |
tree | 7eebba42dac307fdfcf600f5f6527afe0c0f4fea /build2/config/utility | |
parent | 34cc74df52ed129bffeb7b6fcf11f05c222550ba (diff) |
Add config.bin.target var/hint, use to decide libso{} install mode
Normally the user doesn't need to specify config.bin.target explicitly
since the cxx module will hint it. We now also have the whole set of
target's components:
bin.target.{cpu,vendor,system,version,class}
Diffstat (limited to 'build2/config/utility')
-rw-r--r-- | build2/config/utility | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/build2/config/utility b/build2/config/utility index beab758..c47cecf 100644 --- a/build2/config/utility +++ b/build2/config/utility @@ -55,6 +55,21 @@ namespace build2 return required (root, name, string (default_value), override); } + // As above, but leave the unspecified value as undefined (and return + // NULL pointer) rather than setting it to the default value. + // + // This can be useful when we don't have a default value but may figure + // out some fallback. See config.bin.target for an example. + // + pair<const value*, bool> + required (scope& root, const variable&); + + inline pair<const value*, bool> + required (scope& root, const string& name) + { + return required (root, var_pool.find (name)); + } + // Set, if necessary, an optional config.* variable. In particular, // an unspecified variable is set to NULL which is used to distinguish // between the "configured as unspecified" and "not yet configured" |