Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added additional C++ include directories #10

Merged
merged 1 commit into from
May 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion pybind11_mkdoc/mkdoc_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def folder_version(d):
# useful when installing LLVM to non standard directories
if 'LLVM_DIR_PATH' in os.environ:
llvm_dir = os.environ['LLVM_DIR_PATH']
else:
else:
llvm_dir = max((
path
for libdir in ['lib64', 'lib', 'lib32']
Expand All @@ -302,6 +302,21 @@ def folder_version(d):

parameters.extend(['-isystem', clang_include_dir])

# Add additional C++ include directories
cpp_dirs = []

cpp_dirs.append(max(
glob('/usr/include/c++/*'
), default=None, key=folder_version))

cpp_dirs.append(max(
glob('/usr/include/%s-linux-gnu/c++/*' % platform.machine()
), default=None, key=folder_version))

for cpp_dir in cpp_dirs :
if cpp_dir is not None :
parameters.extend(['-isystem', cpp_dir])

parameters.extend(['-isystem', '/usr/include/%s-linux-gnu' % platform.machine(),
'-isystem', '/usr/include'])

Expand Down