Fix broken make on windows (#2499)
* fix Makefile for make on windows * clean up compilation warnings * fix for `no file name for include` make warning
This commit is contained in:
parent
ba820847f9
commit
7350085955
6
Makefile
6
Makefile
@ -29,7 +29,9 @@ endif
|
|||||||
include $(DMLC_CORE)/make/dmlc.mk
|
include $(DMLC_CORE)/make/dmlc.mk
|
||||||
|
|
||||||
# include the plugins
|
# include the plugins
|
||||||
|
ifdef XGB_PLUGINS
|
||||||
include $(XGB_PLUGINS)
|
include $(XGB_PLUGINS)
|
||||||
|
endif
|
||||||
|
|
||||||
# set compiler defaults for OSX versus *nix
|
# set compiler defaults for OSX versus *nix
|
||||||
# let people override either
|
# let people override either
|
||||||
@ -70,13 +72,15 @@ endif
|
|||||||
ifeq ($(UNAME), Windows)
|
ifeq ($(UNAME), Windows)
|
||||||
XGBOOST_DYLIB = lib/libxgboost.dll
|
XGBOOST_DYLIB = lib/libxgboost.dll
|
||||||
JAVAINCFLAGS += -I${JAVA_HOME}/include/win32
|
JAVAINCFLAGS += -I${JAVA_HOME}/include/win32
|
||||||
else ifeq ($(UNAME), Darwin)
|
else
|
||||||
|
ifeq ($(UNAME), Darwin)
|
||||||
XGBOOST_DYLIB = lib/libxgboost.dylib
|
XGBOOST_DYLIB = lib/libxgboost.dylib
|
||||||
CFLAGS += -fPIC
|
CFLAGS += -fPIC
|
||||||
else
|
else
|
||||||
XGBOOST_DYLIB = lib/libxgboost.so
|
XGBOOST_DYLIB = lib/libxgboost.so
|
||||||
CFLAGS += -fPIC
|
CFLAGS += -fPIC
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(UNAME), Linux)
|
ifeq ($(UNAME), Linux)
|
||||||
LDFLAGS += -lrt
|
LDFLAGS += -lrt
|
||||||
|
|||||||
@ -588,7 +588,7 @@ inline bst_float RegTree::FillNodeMeanValue(int nid) {
|
|||||||
|
|
||||||
inline void RegTree::CalculateContributions(const RegTree::FVec& feat, unsigned root_id,
|
inline void RegTree::CalculateContributions(const RegTree::FVec& feat, unsigned root_id,
|
||||||
bst_float *out_contribs) const {
|
bst_float *out_contribs) const {
|
||||||
CHECK_GT(this->node_mean_values.size(), 0);
|
CHECK_GT(this->node_mean_values.size(), 0U);
|
||||||
// this follows the idea of http://blog.datadive.net/interpreting-random-forests/
|
// this follows the idea of http://blog.datadive.net/interpreting-random-forests/
|
||||||
bst_float node_value;
|
bst_float node_value;
|
||||||
unsigned split_index;
|
unsigned split_index;
|
||||||
|
|||||||
@ -324,7 +324,7 @@ class FastHistMaker: public TreeUpdater {
|
|||||||
std::numeric_limits<float>::infinity());
|
std::numeric_limits<float>::infinity());
|
||||||
}
|
}
|
||||||
|
|
||||||
CHECK_GT(out_preds.size(), 0);
|
CHECK_GT(out_preds.size(), 0U);
|
||||||
|
|
||||||
for (const RowSetCollection::Elem rowset : row_set_collection_) {
|
for (const RowSetCollection::Elem rowset : row_set_collection_) {
|
||||||
if (rowset.begin != nullptr && rowset.end != nullptr) {
|
if (rowset.begin != nullptr && rowset.end != nullptr) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user