diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-10-01 11:05:49 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-10-01 12:04:38 +0200 |
commit | db8336a686a85f0e458acb2d5f1ad442585bfc9a (patch) | |
tree | d0e9aa2ce76eb2f208a5d63a1258cf218af2aacc /libbuild2/cc/init.cxx | |
parent | d4457a6427401ed4d5c09eba00cac84c5664f250 (diff) |
Add notion of internal scope, translate external -I to -isystem or equivalent
Diffstat (limited to 'libbuild2/cc/init.cxx')
-rw-r--r-- | libbuild2/cc/init.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libbuild2/cc/init.cxx b/libbuild2/cc/init.cxx index 07f082f..769f6bb 100644 --- a/libbuild2/cc/init.cxx +++ b/libbuild2/cc/init.cxx @@ -97,12 +97,14 @@ namespace build2 vp.insert<strings> ("config.cc.loptions"); vp.insert<strings> ("config.cc.aoptions"); vp.insert<strings> ("config.cc.libs"); + vp.insert<string> ("config.cc.internal.scope"); vp.insert<strings> ("cc.poptions"); vp.insert<strings> ("cc.coptions"); vp.insert<strings> ("cc.loptions"); vp.insert<strings> ("cc.aoptions"); vp.insert<strings> ("cc.libs"); + vp.insert<string> ("cc.internal.scope"); vp.insert<strings> ("cc.export.poptions"); vp.insert<strings> ("cc.export.coptions"); @@ -298,6 +300,24 @@ namespace build2 rs.assign ("cc.libs") += cast_null<strings> ( lookup_config (rs, "config.cc.libs", nullptr)); + // config.cc.internal.scope + // + // Note: save omitted. + // + if (lookup l = lookup_config (rs, "config.cc.internal.scope")) + { + if (cast<string> (l) == "current") + fail << "'current' value in config.cc.internal.scope"; + + // This is necessary in case we are acting as bundle amalgamation. + // + rs.assign ("cc.internal.scope") = *l; + } + + // config.cc.reprocess + // + // Note: save omitted. + // if (lookup l = lookup_config (rs, "config.cc.reprocess")) rs.assign ("cc.reprocess") = *l; |