Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
pinocchio
Commits
73dd5e1d
Verified
Commit
73dd5e1d
authored
Oct 30, 2021
by
Justin Carpentier
Browse files
cmake: fix linkage for pybind11_add_module
See
https://github.com/pybind/pybind11/issues/3081
for further details
parent
c7486a31
Changes
1
Hide whitespace changes
Inline
Side-by-side
unittest/python/pybind11/CMakeLists.txt
View file @
73dd5e1d
...
...
@@ -8,8 +8,9 @@ if(CMAKE_VERSION VERSION_GREATER 3.11)
FetchContent_Populate
(
pybind11
)
add_subdirectory
(
${
pybind11_SOURCE_DIR
}
${
pybind11_BINARY_DIR
}
)
pybind11_add_module
(
cpp2pybind11 cpp2pybind11.cpp
)
target_link_libraries
(
cpp2pybind11 PRIVATE pinocchio_pywrap
)
#pybind11_add_module(cpp2pybind11 cpp2pybind11.cpp) # BUG: might not work out of the box on OSX with conda: https://github.com/pybind/pybind11/issues/3081
add_library
(
cpp2pybind11 MODULE cpp2pybind11.cpp
)
target_link_libraries
(
cpp2pybind11 PRIVATE pinocchio_pywrap pybind11::module
)
IF
(
BUILD_WITH_OPENMP_SUPPORT AND NOT LINK_PYTHON_INTERFACE_TO_OPENMP
)
TARGET_LINK_LIBRARIES
(
cpp2pybind11 PRIVATE OpenMP::OpenMP_CXX
)
...
...
Write
Preview
Supports
Markdown
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