Commit 28228857 authored by Jayaram Bobba's avatar Jayaram Bobba Committed by Scott Cyphers

Prefer local versions over code available externally (#1639)

parent b0f4c16e
......@@ -166,6 +166,14 @@ if (NGRAPH_CPU_ENABLE)
endif()
target_include_directories(cpu_backend SYSTEM PUBLIC libmkldnn)
set_target_properties(cpu_backend PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${NGRAPH_BUILD_DIR})
if (NOT APPLE)
# CPU backend uses third-party libraries like Eigen that might be linked in and
# exported by other DSOs as well. In the absence of versioning, this could lead to the
# CPU backend picking up the wrong version or even multiple versions of the
# third-party library. -Bsymbolic-functions tells the linker to prefer the internal
# version inside cpu_backend over what is available through the global symbol table
set_property(TARGET cpu_backend APPEND PROPERTY LINK_FLAGS "-Wl,-Bsymbolic-functions")
endif()
install(TARGETS cpu_backend LIBRARY DESTINATION ${NGRAPH_INSTALL_LIB})
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment