diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-12-08 13:41:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-12-08 13:41:06 +0200 |
commit | 138ca40c2187ab4d1f11747555d9878cf3422496 (patch) | |
tree | 9e88d2b75d68745b7a8af6300bbc8deeb19d6dd2 /libbuild2/cc/gcc.cxx | |
parent | f7600f07eecbdac0a4400ca2bc39e3e9f5a53b1b (diff) |
Normalize extracted header/library search directories (GH issue #235)
Diffstat (limited to 'libbuild2/cc/gcc.cxx')
-rw-r--r-- | libbuild2/cc/gcc.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libbuild2/cc/gcc.cxx b/libbuild2/cc/gcc.cxx index 755b0d8..b553c8c 100644 --- a/libbuild2/cc/gcc.cxx +++ b/libbuild2/cc/gcc.cxx @@ -45,6 +45,13 @@ namespace build2 d = dir_path (o, 2, string::npos); else continue; + + // Ignore relative paths. Or maybe we should warn? + // + if (d.relative ()) + continue; + + d.normalize (); } catch (const invalid_path& e) { @@ -52,10 +59,7 @@ namespace build2 << o << "'"; } - // Ignore relative paths. Or maybe we should warn? - // - if (!d.relative ()) - r.push_back (move (d)); + r.push_back (move (d)); } } |