Update plugin instructions for CMake build (#6289)

This commit is contained in:
Akira Funahashi 2020-10-27 09:42:07 +09:00 committed by GitHub
parent c8ec62103a
commit 8e0f5a6fc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,8 +9,7 @@ There are three steps you need to do to add a plugin to xgboost
- In this example ```XGBOOST_REGISTER_OBJECTIVE``` in [this line](custom_obj.cc#L78) - In this example ```XGBOOST_REGISTER_OBJECTIVE``` in [this line](custom_obj.cc#L78)
- Add a line to `xgboost/plugin/CMakeLists.txt`: - Add a line to `xgboost/plugin/CMakeLists.txt`:
``` ```
set(PLUGINS_SOURCES ${PLUGINS_SOURCES} target_sources(objxgboost PRIVATE ${xgboost_SOURCE_DIR}/plugin/example/custom_obj.cc)
${xgboost_SOURCE_DIR}/plugin/example/custom_obj.cc PARENT_SCOPE)
``` ```
Then you can test this plugin by using ```objective=mylogistic``` parameter. Then you can test this plugin by using ```objective=mylogistic``` parameter.