Skip to content
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

Merged
merged 3 commits into from
Apr 26, 2019
Merged

[one dmlc-core] by default build with dmlc-core from xgboost #91

merged 3 commits into from
Apr 26, 2019

Conversation

chenqin
Copy link
Contributor

@chenqin 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
@chenqin
Copy link
Contributor Author

chenqin commented Apr 25, 2019

@trivialfis @CodingCat

#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>"
Copy link
Member

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?

Copy link
Member

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

Copy link
Member

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

@trivialfis
Copy link
Member

@chenqin Thanks! Have you tried it with XGBoost?

@chenqin
Copy link
Contributor Author

chenqin commented Apr 26, 2019

link to chenqin/rabit master, pass travis-ci
commit
chenqin/xgboost@c3b8af1
travis
https://travis-ci.org/chenqin/xgboost/builds/524781844

@trivialfis trivialfis merged commit 5c3b36f into dmlc:master Apr 26, 2019
@trivialfis
Copy link
Member

Thanks!

@@ -9,7 +9,10 @@
#include <vector>
#include <string>
#include "./internal/utils.h"

#ifndef DMLC_IO_H_
#include "../../dmlc-core/include/dmlc/io.h"

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.

Copy link
Contributor Author

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>"

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants