Export Python Interface for external memory. (#7070)
* Add Python iterator interface. * Add tests. * Add demo. * Add documents. * Handle empty dataset.
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(api-demo LANGUAGES C VERSION 0.0.1)
|
||||
find_package(xgboost REQUIRED)
|
||||
project(xgboost-c-examples)
|
||||
|
||||
# xgboost is built as static libraries, all cxx dependencies need to be linked into the
|
||||
# executable.
|
||||
if (XGBOOST_BUILD_STATIC_LIB)
|
||||
enable_language(CXX)
|
||||
# find again for those cxx libraries.
|
||||
find_package(xgboost REQUIRED)
|
||||
endif(XGBOOST_BUILD_STATIC_LIB)
|
||||
add_subdirectory(basic)
|
||||
add_subdirectory(external-memory)
|
||||
|
||||
add_executable(api-demo c-api-demo.c)
|
||||
target_link_libraries(api-demo PRIVATE xgboost::xgboost)
|
||||
enable_testing()
|
||||
add_test(
|
||||
NAME test_xgboost_demo_c_basic
|
||||
COMMAND api-demo
|
||||
WORKING_DIRECTORY ${xgboost-c-examples_BINARY_DIR}
|
||||
)
|
||||
add_test(
|
||||
NAME test_xgboost_demo_c_external_memory
|
||||
COMMAND external-memory-demo
|
||||
WORKING_DIRECTORY ${xgboost-c-examples_BINARY_DIR}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user