Skip to content

Commit 3b4bc72

Browse files
authored
fix osx build and suppress clang warnings (pytorch#1432)
1 parent dca208b commit 3b4bc72

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

torch/lib/THPP/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ endif(NOT ${CMAKE_VERSION} VERSION_LESS "3.1")
9393
TARGET_LINK_LIBRARIES(THPP LINK_PRIVATE ${TH_LIBRARIES} ${THS_LIBRARIES})
9494
IF(CUDA_FOUND)
9595
TARGET_LINK_LIBRARIES(THPP LINK_PRIVATE ${THC_LIBRARIES} ${THCS_LIBRARIES})
96+
TARGET_LINK_LIBRARIES(THPP ${CUDA_LIBRARIES})
9697
ENDIF()
9798

9899
INSTALL(TARGETS THPP

torch/lib/build_all.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ BASIC_C_FLAGS=" -DTH_INDEX_BASE=0 -I$INSTALL_DIR/include \
2828
LDFLAGS="-L$INSTALL_DIR/lib "
2929
LD_POSTFIX=".so.1"
3030
LD_POSTFIX_UNVERSIONED=".so"
31-
if [[ $(uname) == 'Darwin' ]]; then
32-
LDFLAGS="$LDFLAGS -Wl,-rpath,@loader_path"
31+
if [[ $(uname) == 'Darwin' ]]; then
32+
LDFLAGS="$LDFLAGS -Qunused-arguments -Wl,-rpath,@loader_path"
3333
LD_POSTFIX=".1.dylib"
3434
LD_POSTFIX_UNVERSIONED=".dylib"
3535
else

0 commit comments

Comments
 (0)