Skip to content

Commit

Permalink
Allow custom XGBoost versions in XGBOOST_BUILD_VERSION
Browse files Browse the repository at this point in the history
Currently XGBoost.jl allow building either "master" or known stable
tags of XGBoost git repository. This change removes that restriction
and make it possible to build any tagged version, branch or git
commitsh. This is required to workaround some of XGBoost.jl package
build issues.
  • Loading branch information
Prabodha Rodrigo committed Apr 17, 2019
1 parent feabe83 commit 42461d1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ using BinDeps

xgboost = library_dependency("xgboost", aliases = ["libxgboost.so"])

if haskey(ENV, "XGBOOST_BUILD_VERSION") && ENV["XGBOOST_BUILD_VERSION"] == "master"
libcheckout = `git checkout master`
onload = "global const build_version = \"master\""
info("Using the latest master version of the XGBoost library")
if haskey(ENV, "XGBOOST_BUILD_VERSION")
build_version = ENV["XGBOOST_BUILD_VERSION"]
libcheckout = `git checkout $(build_version)`
onload = "global const build_version = \"$(build_version)\""
info("Using the $(build_version) version of the XGBoost library")
else
libcheckout = `git checkout v0.60`
onload = "global const build_version = \"0.60\""
Expand Down

0 comments on commit 42461d1

Please sign in to comment.