aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/pkgconfig.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-10-01 11:05:49 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-10-01 12:04:38 +0200
commitdb8336a686a85f0e458acb2d5f1ad442585bfc9a (patch)
treed0e9aa2ce76eb2f208a5d63a1258cf218af2aacc /libbuild2/cc/pkgconfig.cxx
parentd4457a6427401ed4d5c09eba00cac84c5664f250 (diff)
Add notion of internal scope, translate external -I to -isystem or equivalent
Diffstat (limited to 'libbuild2/cc/pkgconfig.cxx')
-rw-r--r--libbuild2/cc/pkgconfig.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/libbuild2/cc/pkgconfig.cxx b/libbuild2/cc/pkgconfig.cxx
index fd2cd07..7b4f86d 100644
--- a/libbuild2/cc/pkgconfig.cxx
+++ b/libbuild2/cc/pkgconfig.cxx
@@ -1525,13 +1525,12 @@ namespace build2
for (auto i (v->begin ()); i != v->end (); ++i)
{
const string& o (*i);
- size_t n (o.size ());
// Filter out -I (both -I<dir> and -I <dir> forms).
//
- if (n >= 2 && o[0] == '-' && o[1] == 'I')
+ if (o[0] == '-' && o[1] == 'I')
{
- if (n == 2)
+ if (o.size () == 2)
++i;
continue;