Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoumith Chintala <soumith@fb.com>2016-12-31 06:08:09 +0300
committerSoumith Chintala <soumith@fb.com>2016-12-31 06:08:09 +0300
commitbf83c63728f38a2c336a5427ec7f32c79a423804 (patch)
tree56b5b33c3adc4c1807907f49ca451cb86a192cc9
parent01b67ab565d9e6a49ae41e0afaa437bf4449be6f (diff)
adding TH_LIBRARIES var to THNN cmake
-rw-r--r--lib/THNN/CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/THNN/CMakeLists.txt b/lib/THNN/CMakeLists.txt
index 1de8b2b..33eaf56 100644
--- a/lib/THNN/CMakeLists.txt
+++ b/lib/THNN/CMakeLists.txt
@@ -5,6 +5,11 @@ IF(NOT Torch_FOUND)
FIND_PACKAGE(Torch REQUIRED)
ENDIF()
+IF(NOT TH_LIBRARIES)
+ SET(TH_LIBRARIES "TH")
+ENDIF(NOT TH_LIBRARIES)
+MESSAGE(STATUS "TH_LIBRARIES: ${TH_LIBRARIES}")
+
IF(NOT THNN_INSTALL_LIB_SUBDIR)
SET(THNN_INSTALL_LIB_SUBDIR "lib" CACHE PATH "THNN install library directory")
ENDIF()
@@ -61,7 +66,8 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
SET_TARGET_PROPERTIES(THNN PROPERTIES
PREFIX "lib"
IMPORT_PREFIX "lib")
-TARGET_LINK_LIBRARIES(THNN TH)
+
+TARGET_LINK_LIBRARIES(THNN ${TH_LIBRARIES})
# Luarocks bug pre-14.04 prevents us from setting it for Lua-Torch
IF(THNN_SO_VERSION)