Do not normalize path to abs if directory does not exist

This commit is contained in:
Ivan Kravets
2023-04-21 12:52:39 +03:00
parent 82d380d895
commit b991d9f25c

View File

@ -200,7 +200,7 @@ def ParseFlagsExtended(env, flags): # pylint: disable=too-many-branches
# fix relative CPPPATH & LIBPATH
for k in ("CPPPATH", "LIBPATH"):
for i, p in enumerate(result.get(k, [])):
if not os.path.isabs(p):
if os.path.isdir(p):
result[k][i] = os.path.abspath(p)
# fix relative path for "-include"