Update plugin instructions for CMake build (#6289)
This commit is contained in:
parent
c8ec62103a
commit
8e0f5a6fc7
@ -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.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user