From db8336a686a85f0e458acb2d5f1ad442585bfc9a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 1 Oct 2021 11:05:49 +0200 Subject: Add notion of internal scope, translate external -I to -isystem or equivalent --- libbuild2/cc/pkgconfig.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libbuild2/cc/pkgconfig.cxx') 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 and -I forms). // - if (n >= 2 && o[0] == '-' && o[1] == 'I') + if (o[0] == '-' && o[1] == 'I') { - if (n == 2) + if (o.size () == 2) ++i; continue; -- cgit v1.1