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

github.com/torch/cunn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoumith Chintala <soumith@gmail.com>2017-09-07 09:15:28 +0300
committerSoumith Chintala <soumith@gmail.com>2017-09-07 09:41:45 +0300
commit1ae6aa08bd062bb609d126ca7a2d8f5411797b8c (patch)
tree5e3da21d9c2e2d9d235a3d6cfc12d4476ff08f3a
parent8980c40b0c4fce7736e9837fecbe2c7ac437d34b (diff)
fix static linkage and make THD statically linkedHEADmaster
-rw-r--r--lib/THCUNN/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/THCUNN/CMakeLists.txt b/lib/THCUNN/CMakeLists.txt
index 46eda7e..6bc5813 100644
--- a/lib/THCUNN/CMakeLists.txt
+++ b/lib/THCUNN/CMakeLists.txt
@@ -32,6 +32,10 @@ ENDIF()
IF ($ENV{TH_BINARY_BUILD})
MESSAGE(STATUS "TH_BINARY_BUILD detected. Statically linking libstdc++")
SET(CMAKE_CXX_FLAGS "-static-libstdc++ ${CMAKE_CXX_FLAGS}")
+ IF (UNIX AND NOT APPLE)
+ # hiding statically linked library symbols, this flag is not available for the linker under MACOSX
+ SET(CMAKE_CXX_FLAGS "-Wl,--exclude-libs,libstdc++.a ${CMAKE_CXX_FLAGS}")
+ ENDIF(UNIX AND NOT APPLE)
ENDIF()
# Detect CUDA architecture and get best NVCC flags