Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Prefer local versions over code available externally (#1639)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbobba authored and diyessi committed Sep 19, 2018
1 parent b0f4c16 commit 2822885
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ngraph/runtime/cpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 2822885

Please sign in to comment.