Spec Header Dirs: Only first include/ (#13991)
* CUDA HeaderList: Unit Test * Spec Header Dirs: Only first include/ Avoid matching recurringly nested include paths that usually refer to internally shipped libraries in packages. Example in CUDA Toolkit, shipping a libc++ fork internally with libcu++ since 10.2.89: `<prefix>/include/cuda/some/more/details/include/` or `<prefix>/include/cuda/std/detail/libcxx/include` regex: non-greedy first match of include Co-Authored-By: Massimiliano Culpo <massimiliano.culpo@gmail.com> * CUDA: Re-Enable 10.2.89 as Default
This commit is contained in:
@@ -1156,7 +1156,9 @@ class HeaderList(FileList):
|
||||
|
||||
# Make sure to only match complete words, otherwise path components such
|
||||
# as "xinclude" will cause false matches.
|
||||
include_regex = re.compile(r'(.*)(\binclude\b)(.*)')
|
||||
# Avoid matching paths such as <prefix>/include/something/detail/include,
|
||||
# e.g. in the CUDA Toolkit which ships internal libc++ headers.
|
||||
include_regex = re.compile(r'(.*?)(\binclude\b)(.*)')
|
||||
|
||||
def __init__(self, files):
|
||||
super(HeaderList, self).__init__(files)
|
||||
|
Reference in New Issue
Block a user