Skip to content

Commit

Permalink
[backport] Link CMAKE_DL_LIBS when dlopen is used. (#10447) (#10450)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis authored Jun 19, 2024
1 parent e3bcedd commit d4bd5cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmake/Utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ function(xgboost_link_nccl target)
set(xgboost_nccl_flags -DXGBOOST_USE_NCCL=1)
if(USE_DLOPEN_NCCL)
list(APPEND xgboost_nccl_flags -DXGBOOST_USE_DLOPEN_NCCL=1)
target_link_libraries(${target} PRIVATE ${CMAKE_DL_LIBS})
endif()

if(BUILD_STATIC_LIB)
Expand Down

0 comments on commit d4bd5cf

Please sign in to comment.