From 7d0528c1a9cac4763efdb3c60f650a8d7c6d7d3c Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Staff=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Tue, 16 Oct 2018 16:10:32 +0900 Subject: [PATCH] [nnkit] Link thread libraries (#1880) This commit links thread libraries to nnkit_support_backend to properly support multi-threaded backends (such as a backend based on ARMCompute NEON). Signed-off-by: Jonghyun Park --- contrib/nnkit/libs/support/backend/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contrib/nnkit/libs/support/backend/CMakeLists.txt b/contrib/nnkit/libs/support/backend/CMakeLists.txt index a5162bd..7cf0277 100644 --- a/contrib/nnkit/libs/support/backend/CMakeLists.txt +++ b/contrib/nnkit/libs/support/backend/CMakeLists.txt @@ -3,3 +3,10 @@ file(GLOB_RECURSE SOURCES "src/*.cpp") add_library(nnkit_support_backend STATIC ${SOURCES}) target_include_directories(nnkit_support_backend PUBLIC include) target_link_libraries(nnkit_support_backend PUBLIC nnkit_intf_backend) + +find_package(Threads QUIET) + +if(TARGET Threads::Threads) + # This is necessary to support multi-threaded backends + target_link_libraries(nnkit_support_backend PUBLIC Threads::Threads) +endif(TARGET Threads::Threads) -- 2.7.4