Skip to content

Commit

Permalink
fix static linkage and make THD statically linked
Browse files Browse the repository at this point in the history
  • Loading branch information
soumith committed Sep 7, 2017
1 parent 8980c40 commit 1ae6aa0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/THCUNN/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1ae6aa0

Please sign in to comment.