From 0d89c44f583be32d15e2c5e5a03c46f3a78d211c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 2 Mar 2018 09:18:59 +0000 Subject: [PATCH] [Minor] Try to fix linking issue --- contrib/torch/torch7/CMakeLists.txt | 1 + contrib/torch/torch7/lib/TH/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/contrib/torch/torch7/CMakeLists.txt b/contrib/torch/torch7/CMakeLists.txt index 7519e85d7..aa848905a 100644 --- a/contrib/torch/torch7/CMakeLists.txt +++ b/contrib/torch/torch7/CMakeLists.txt @@ -63,6 +63,7 @@ SET(luasrc init.lua File.lua Tensor.lua CmdLine.lua FFInterface.lua Tester.lua T ADD_TORCH_PACKAGE(torch "${src}" "${luasrc}") TARGET_LINK_LIBRARIES(torch luaT TH) +TARGET_LINK_LIBRARIES(torch ottery) IF(LUALIB) TARGET_LINK_LIBRARIES(torch ${LUALIB}) diff --git a/contrib/torch/torch7/lib/TH/CMakeLists.txt b/contrib/torch/torch7/lib/TH/CMakeLists.txt index 2b71bc3d0..c76d26e06 100644 --- a/contrib/torch/torch7/lib/TH/CMakeLists.txt +++ b/contrib/torch/torch7/lib/TH/CMakeLists.txt @@ -291,6 +291,8 @@ IF(NOT MSVC) TARGET_LINK_LIBRARIES(TH m) ENDIF(NOT MSVC) +TARGET_LINK_LIBRARIES(TH ottery) + # Is __thread supported? IF(NOT MSVC) CHECK_C_SOURCE_COMPILES("static __thread int x = 1; int main() { return x; }" C_HAS_THREAD) -- 2.39.5