Skip to content

Commit d4bd5cf

Browse files
authored
[backport] Link CMAKE_DL_LIBS when dlopen is used. (#10447) (#10450)
1 parent e3bcedd commit d4bd5cf

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
@@ -137,6 +137,7 @@ function(xgboost_link_nccl target)
137137
set(xgboost_nccl_flags -DXGBOOST_USE_NCCL=1)
138138
if(USE_DLOPEN_NCCL)
139139
list(APPEND xgboost_nccl_flags -DXGBOOST_USE_DLOPEN_NCCL=1)
140+
target_link_libraries(${target} PRIVATE ${CMAKE_DL_LIBS})
140141
endif()
141142

142143
if(BUILD_STATIC_LIB)

0 commit comments

Comments
 (0)