diff options
author | Soumith Chintala <soumith@gmail.com> | 2017-09-07 09:15:28 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2017-09-07 09:41:16 +0300 |
commit | 326b5a5224bfef5a8f585e5340054e55d44cb453 (patch) | |
tree | d24233c5cae386cb1ba96a1ea1cdb3a7dcae4cba | |
parent | 997b8b1bb8f28f0eab1483d76f1d4e9a000b5a70 (diff) |
fix static linkage and make THD statically linked
-rw-r--r-- | lib/THC/CMakeLists.txt | 4 |
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) |