We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0e24138 + 726b91e commit 5d6783fCopy full SHA for 5d6783f
cmake/generic.cmake
@@ -261,6 +261,13 @@ function(cc_library TARGET_NAME)
261
add_dependencies(${TARGET_NAME} mklml)
262
target_link_libraries(${TARGET_NAME} "-L${MKLML_LIB_DIR} -liomp5 -Wl,--as-needed")
263
endif()
264
+ # remove link to python, see notes at:
265
+ # https://github.com/pybind/pybind11/blob/master/docs/compiling.rst#building-manually
266
+ if("${cc_library_DEPS};" MATCHES "python;")
267
+ list(REMOVE_ITEM cc_library_DEPS python)
268
+ add_dependencies(${TARGET_NAME} python)
269
+ target_link_libraries(${TARGET_NAME} "-Wl,-undefined,dynamic_lookup")
270
+ endif()
271
target_link_libraries(${TARGET_NAME} ${cc_library_DEPS})
272
add_dependencies(${TARGET_NAME} ${cc_library_DEPS})
273
0 commit comments