Skip to content

Commit 63418d2

Browse files
authored
Link CMAKE_DL_LIBS when dlopen is used. (dmlc#10447)
1 parent 45150a8 commit 63418d2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmake/Utils.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ function(xgboost_link_nccl target)
136136
set(xgboost_nccl_flags -DXGBOOST_USE_NCCL=1)
137137
if(USE_DLOPEN_NCCL)
138138
list(APPEND xgboost_nccl_flags -DXGBOOST_USE_DLOPEN_NCCL=1)
139+
target_link_libraries(${target} PRIVATE ${CMAKE_DL_LIBS})
139140
endif()
140141

141142
if(BUILD_STATIC_LIB)

0 commit comments

Comments
 (0)