[one dmlc-core] by default build with dmlc-core from xgboost#91
[one dmlc-core] by default build with dmlc-core from xgboost#91trivialfis merged 3 commits intodmlc:masterfrom chenqin:master
Conversation
chenqin
commented
Apr 24, 2019
- remove dmlc-core gitsubmodule from rabit
- use travis cmd & RABIT_BUILD_DMLC = 1 to build rabit with dmlc-core included
RABIT_BUILD_DMLC=1 if use dmlc-core in rabit
| #include "./internal/utils.h" | ||
| target_include_directories(${lib} PUBLIC | ||
| "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>" | ||
| "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/../dmlc_core/include>" |
There was a problem hiding this comment.
may leave comments here about we assume rabit and dmlc-core are both put in the root path of the project which depends on it?
There was a problem hiding this comment.
or we have some way to detect it
There was a problem hiding this comment.
nvm, I think they only need to be in the same level of dir which is very likely to be the case
|
@chenqin Thanks! Have you tried it with XGBoost? |
|
link to chenqin/rabit master, pass travis-ci |
|
Thanks! |
| #include "./internal/utils.h" | ||
|
|
||
| #ifndef DMLC_IO_H_ | ||
| #include "../../dmlc-core/include/dmlc/io.h" |
There was a problem hiding this comment.
This is a no go. If you do this you can just put the source of dmlc and rabit together in a single project.
Correct way to do this would be to just include dmlc/io.h and to let cmake correctly determine include dirs.
There was a problem hiding this comment.
| #include "./internal/utils.h" | ||
| target_include_directories(${lib} PUBLIC | ||
| "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>" | ||
| "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/../dmlc_core/include>" |
There was a problem hiding this comment.
This is a really ugly hack. Don’t assume something outside of your project. This is what cmake is for. Set the correct include dir on the target using cmake.
There was a problem hiding this comment.