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/common.ixx | |
parent | d4457a6427401ed4d5c09eba00cac84c5664f250 (diff) |
Add notion of internal scope, translate external -I to -isystem or equivalent
Diffstat (limited to 'libbuild2/cc/common.ixx')
-rw-r--r-- | libbuild2/cc/common.ixx | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/libbuild2/cc/common.ixx b/libbuild2/cc/common.ixx new file mode 100644 index 0000000..ce28890 --- /dev/null +++ b/libbuild2/cc/common.ixx @@ -0,0 +1,34 @@ +// file : libbuild2/cc/common.ixx -*- C++ -*- +// license : MIT; see accompanying LICENSE file + +namespace build2 +{ + namespace cc + { + inline const scope* data:: + effective_internal_scope (const scope& bs) const + { + if (internal_scope == nullptr) + return nullptr; + else + { + const string& s (*internal_scope); + + if (s == "current") + return internal_scope_current; + else if (s == "base") + return &bs; + else if (s == "root") + return bs.root_scope (); + else if (s == "bundle") + return bs.bundle_scope (); + else if (s == "strong") + return bs.strong_scope (); + else if (s == "weak") + return bs.weak_scope (); + else + return nullptr; + } + } + } +} |