-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[one dmlc-core] by default build with dmlc-core from xgboost #91
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or we have some way to detect it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! |
@@ -9,7 +9,10 @@ | |||
#include <vector> | |||
#include <string> | |||
#include "./internal/utils.h" | |||
|
|||
#ifndef DMLC_IO_H_ | |||
#include "../../dmlc-core/include/dmlc/io.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.