diff options
-rw-r--r-- | lib/THCUNN/CMakeLists.txt | 4 |
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 |