mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
build_env.py: filter non-existent dirs from INCLUDES, LIBDIRS
This commit is contained in:
@ -153,6 +153,7 @@ class Env(object):
|
||||
'/usr/local/include',
|
||||
'/usr/include',
|
||||
]
|
||||
INCLUDES = [s for s in INCLUDES if s == GENDIR or os.path.isdir(s)]
|
||||
INCLUDES = ' '.join(['-I' + s for s in INCLUDES])
|
||||
# Python
|
||||
INCLUDES += ' ' + _GetPythonIncludes()
|
||||
@ -162,6 +163,7 @@ class Env(object):
|
||||
'/usr/local/lib',
|
||||
'/usr/lib',
|
||||
]
|
||||
LIBDIRS = [s for s in LIBDIRS if os.path.isdir(s)]
|
||||
LIBDIRS = ' '.join(['-L' + s for s in LIBDIRS])
|
||||
# Python
|
||||
LIBDIRS += ' ' + _GetPythonLibDirs()
|
||||
|
Reference in New Issue
Block a user