Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
afb9c177
Commit
afb9c177
authored
Apr 19, 2016
by
Wenzel Jakob
Browse files
make mkdoc now works with the libclang distribution from Apple
parent
e65e5871
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
tools/mkdoc.py
tools/mkdoc.py
+11
-5
No files found.
tools/mkdoc.py
View file @
afb9c177
...
@@ -12,11 +12,6 @@ from collections import OrderedDict
...
@@ -12,11 +12,6 @@ from collections import OrderedDict
from
threading
import
Thread
,
Semaphore
from
threading
import
Thread
,
Semaphore
from
multiprocessing
import
cpu_count
from
multiprocessing
import
cpu_count
if
platform
.
system
()
==
'Darwin'
:
libclang
=
'/opt/llvm/lib/libclang.dylib'
if
os
.
path
.
exists
(
libclang
):
cindex
.
Config
.
set_library_path
(
os
.
path
.
dirname
(
libclang
))
RECURSE_LIST
=
[
RECURSE_LIST
=
[
CursorKind
.
TRANSLATION_UNIT
,
CursorKind
.
TRANSLATION_UNIT
,
CursorKind
.
NAMESPACE
,
CursorKind
.
NAMESPACE
,
...
@@ -188,6 +183,17 @@ if __name__ == '__main__':
...
@@ -188,6 +183,17 @@ if __name__ == '__main__':
parameters
=
[
'-x'
,
'c++'
,
'-std=c++11'
]
parameters
=
[
'-x'
,
'c++'
,
'-std=c++11'
]
filenames
=
[]
filenames
=
[]
if
platform
.
system
()
==
'Darwin'
:
libclang
=
'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib'
if
os
.
path
.
exists
(
libclang
):
cindex
.
Config
.
set_library_path
(
os
.
path
.
dirname
(
libclang
))
base_path
=
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs'
if
os
.
path
.
exists
(
base_path
):
sysroot
=
os
.
path
.
join
(
base_path
,
next
(
os
.
walk
(
base_path
))[
1
][
0
])
parameters
.
append
(
'-isysroot'
)
parameters
.
append
(
sysroot
)
for
item
in
sys
.
argv
[
1
:]:
for
item
in
sys
.
argv
[
1
:]:
if
item
.
startswith
(
'-'
):
if
item
.
startswith
(
'-'
):
parameters
.
append
(
item
)
parameters
.
append
(
item
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment