scons: ensure that if /usr/include is added to CPPPATH it won't be used with -isystem option

This commit is contained in:
loonycyborg 2017-09-22 19:14:16 +03:00
parent 94e4ca1a38
commit 414659200d

View File

@ -1,10 +1,12 @@
from os.path import normpath
def exists(): def exists():
return True return True
def make_incflags(paths, RDirs): def make_incflags(paths, RDirs):
result = [] result = []
for path in paths: for path in paths:
if not str(path).startswith("#"): if not str(path).startswith("#") and normpath(str(path)) != '/usr/include':
for rdir in RDirs((path,)): for rdir in RDirs((path,)):
result.append("-isystem") result.append("-isystem")
result.append(str(rdir)) result.append(str(rdir))