-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix CMake install config to use dependencies * [CI] Test C API demo * Explicitly cast num_feature, to avoid warning in Linux
- Loading branch information
Showing
5 changed files
with
65 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,24 @@ | ||
@PACKAGE_INIT@ | ||
|
||
include(CMakeFindDependencyMacro) | ||
|
||
set(USE_OPENMP @USE_OPENMP@) | ||
set(USE_CUDA @USE_CUDA@) | ||
set(USE_NCCL @USE_NCCL@) | ||
|
||
find_dependency(Threads) | ||
if(USE_OPENMP) | ||
find_dependency(OpenMP) | ||
endif() | ||
if(USE_CUDA) | ||
find_dependency(CUDA) | ||
endif() | ||
if(USE_NCCL) | ||
find_dependency(Nccl) | ||
endif() | ||
|
||
if(NOT TARGET xgboost::xgboost) | ||
include(${CMAKE_CURRENT_LIST_DIR}/XGBoostTargets.cmake) | ||
endif() | ||
|
||
message(STATUS "Found XGBoost (found version \"${xgboost_VERSION}\")") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
cmake_minimum_required(VERSION 3.12) | ||
cmake_minimum_required(VERSION 3.13) | ||
project(api-demo LANGUAGES C CXX VERSION 0.0.1) | ||
find_package(xgboost REQUIRED) | ||
add_executable(api-demo c-api-demo.c) | ||
target_link_libraries(api-demo xgboost::xgboost) | ||
target_link_libraries(api-demo PRIVATE xgboost::xgboost) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters