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

github.com/torch/cutorch.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:16 +0300
commit326b5a5224bfef5a8f585e5340054e55d44cb453 (patch)
treed24233c5cae386cb1ba96a1ea1cdb3a7dcae4cba
parent997b8b1bb8f28f0eab1483d76f1d4e9a000b5a70 (diff)
fix static linkage and make THD statically linked
-rw-r--r--lib/THC/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/THC/CMakeLists.txt b/lib/THC/CMakeLists.txt
index 0fec282..c07a1e4 100644
--- a/lib/THC/CMakeLists.txt
+++ b/lib/THC/CMakeLists.txt
@@ -95,6 +95,10 @@ ENDIF(MAGMA_FOUND)
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()
IF(APPLE)