Skip to content

Commit

Permalink
Fix build for GCC 8.x (dmlc#9670)
Browse files Browse the repository at this point in the history
  • Loading branch information
hcho3 authored and razdoburdin committed Oct 26, 2023
1 parent 09b1e71 commit 6768332
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Expand Up @@ -237,6 +237,11 @@ endif (RABIT_BUILD_MPI)
add_subdirectory(${xgboost_SOURCE_DIR}/src)
target_link_libraries(objxgboost PUBLIC dmlc)

# Link -lstdc++fs for GCC 8.x
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0")
target_link_libraries(objxgboost PUBLIC stdc++fs)
endif()

# Exports some R specific definitions and objects
if (R_LIB)
add_subdirectory(${xgboost_SOURCE_DIR}/R-package)
Expand Down

0 comments on commit 6768332

Please sign in to comment.