Fix R package build with CMake 3.13 (#5895)
* Fix R package build with CMake 3.13 * Require OpenMP for xgboost-r target
This commit is contained in:
parent
3c40f4a7f5
commit
7aee0e51ed
@ -21,7 +21,11 @@ target_include_directories(xgboost-r
|
||||
${PROJECT_SOURCE_DIR}/include
|
||||
${PROJECT_SOURCE_DIR}/dmlc-core/include
|
||||
${PROJECT_SOURCE_DIR}/rabit/include)
|
||||
target_link_libraries(xgboost-r PRIVATE ${LIBR_CORE_LIBRARY})
|
||||
target_link_libraries(xgboost-r PUBLIC ${LIBR_CORE_LIBRARY})
|
||||
if (USE_OPENMP)
|
||||
find_package(OpenMP REQUIRED)
|
||||
target_link_libraries(xgboost-r PUBLIC OpenMP::OpenMP_CXX OpenMP::OpenMP_C)
|
||||
endif (USE_OPENMP)
|
||||
set_target_properties(
|
||||
xgboost-r PROPERTIES
|
||||
CXX_STANDARD 14
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user