diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-03-16 08:06:15 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-03-17 07:47:17 +0200 |
commit | 9f71deeeb0f8e6fe2c29f209fc96f466fc2831b6 (patch) | |
tree | 81e07870c7a16f12c7aca69bf70a71d69251d1fc /libbuild2/cc/init.cxx | |
parent | 1adbf7b710d52958f6c0168ccb492252c1f19d4a (diff) |
Rework config::{omitted,required,optional}() into unified config_lookup()
Diffstat (limited to 'libbuild2/cc/init.cxx')
-rw-r--r-- | libbuild2/cc/init.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libbuild2/cc/init.cxx b/libbuild2/cc/init.cxx index 202c612..723b678 100644 --- a/libbuild2/cc/init.cxx +++ b/libbuild2/cc/init.cxx @@ -244,8 +244,9 @@ namespace build2 // load_module (rs, rs, "cc.core.guess", loc); - // Configure. + // Configuration. // + using config::lookup_config; // Adjust module priority (compiler). // @@ -261,21 +262,21 @@ namespace build2 // // rs.assign ("cc.poptions") += cast_null<strings> ( - config::optional (rs, "config.cc.poptions")); + lookup_config (rs, "config.cc.poptions", nullptr)); rs.assign ("cc.coptions") += cast_null<strings> ( - config::optional (rs, "config.cc.coptions")); + lookup_config (rs, "config.cc.coptions", nullptr)); rs.assign ("cc.loptions") += cast_null<strings> ( - config::optional (rs, "config.cc.loptions")); + lookup_config (rs, "config.cc.loptions", nullptr)); rs.assign ("cc.aoptions") += cast_null<strings> ( - config::optional (rs, "config.cc.aoptions")); + lookup_config (rs, "config.cc.aoptions", nullptr)); rs.assign ("cc.libs") += cast_null<strings> ( - config::optional (rs, "config.cc.libs")); + lookup_config (rs, "config.cc.libs", nullptr)); - if (lookup l = config::omitted (rs, "config.cc.reprocess").first) + if (lookup l = lookup_config (rs, "config.cc.reprocess")) rs.assign ("cc.reprocess") = *l; // Load the bin.config module. |