Unverified Commit 237f0c88 authored by Ilya Churaev's avatar Ilya Churaev Committed by GitHub

Remove Threads dependency (#4501)

* Experiment with removing Threads

* Use private Threads

* Removed Threads

* Added Threads to benchmark

* Revert Threads

* Remove threads
Co-authored-by: 's avatarScott Cyphers <diyessi@users.noreply.github.com>
parent 111ed897
...@@ -28,9 +28,6 @@ ...@@ -28,9 +28,6 @@
@PACKAGE_INIT@ @PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(Threads)
if(NOT TARGET ngraph) if(NOT TARGET ngraph)
include("${CMAKE_CURRENT_LIST_DIR}/ngraphTargets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/ngraphTargets.cmake")
endif() endif()
......
...@@ -732,8 +732,7 @@ target_include_directories(ngraph PUBLIC $<BUILD_INTERFACE:${NGRAPH_INCLUDE_PATH ...@@ -732,8 +732,7 @@ target_include_directories(ngraph PUBLIC $<BUILD_INTERFACE:${NGRAPH_INCLUDE_PATH
add_library(ngraph::ngraph ALIAS ngraph) add_library(ngraph::ngraph ALIAS ngraph)
if (NOT WIN32) if (NOT WIN32)
find_package(Threads REQUIRED) target_link_libraries(ngraph PRIVATE dl)
target_link_libraries(ngraph PUBLIC dl Threads::Threads)
endif() endif()
if (NGRAPH_ONNX_IMPORT_ENABLE) if (NGRAPH_ONNX_IMPORT_ENABLE)
......
...@@ -26,7 +26,9 @@ add_executable(nbench ${SRC}) ...@@ -26,7 +26,9 @@ add_executable(nbench ${SRC})
if (APPLE) if (APPLE)
set_property(TARGET nbench APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-rpath,@loader_path/../lib") set_property(TARGET nbench APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-rpath,@loader_path/../lib")
endif() endif()
target_link_libraries(nbench PRIVATE ngraph)
find_package(Threads REQUIRED)
target_link_libraries(nbench PRIVATE ngraph Threads::Threads)
if (NGRAPH_CPU_ENABLE) if (NGRAPH_CPU_ENABLE)
target_link_libraries(nbench PRIVATE cpu_backend) target_link_libraries(nbench PRIVATE cpu_backend)
endif() 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