-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
xgboost 1.0.0 #50467
xgboost 1.0.0 #50467
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ class Xgboost < Formula | |
desc "Scalable, Portable and Distributed Gradient Boosting Library" | ||
homepage "https://xgboost.ai/" | ||
url "https://github.com/dmlc/xgboost.git", | ||
:tag => "v0.90", | ||
:revision => "515f5f5c4779ff5361dcd796e22d55937e1048ea" | ||
:tag => "v1.0.0", | ||
:revision => "d90e7b31170b86f97eafb6b9b64027abb6881a3e" | ||
|
||
bottle do | ||
cellar :any | ||
|
@@ -13,10 +13,19 @@ class Xgboost < Formula | |
end | ||
|
||
depends_on "cmake" => :build | ||
depends_on "libomp" | ||
|
||
def install | ||
mkdir "build" do | ||
system "cmake", *std_cmake_args, "-DUSE_OPENMP=0", ".." | ||
libomp = Formula["libomp"] | ||
args = std_cmake_args | ||
args << "-DOpenMP_C_FLAGS=\"-Xpreprocessor -fopenmp -I#{libomp.opt_include}\"" | ||
args << "-DOpenMP_C_LIB_NAMES=omp" | ||
args << "-DOpenMP_CXX_FLAGS=\"-Xpreprocessor -fopenmp -I#{libomp.opt_include}\"" | ||
args << "-DOpenMP_CXX_LIB_NAMES=omp" | ||
args << "-DOpenMP_omp_LIBRARY=#{libomp.opt_lib}/libomp.dylib" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Double check this, but if you make the changes I proposed above to enable OpenMP and in a manner such that it is consumable by other packages CMake should default to using gcc-9, g++-9 and pull in
|
||
|
||
system "cmake", *args, ".." | ||
system "make" | ||
system "make", "install" | ||
end | ||
|
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.
Based on my currently incomplete understanding of how Homebrew, OpenMP and formulae all interact, I think this formula should be compiled with GCC, and pull in GCCs native
libgomp
. Here is the relative text from a discussion among maintainers that I feel pretty OK/confident is correct:So if we take that as truth I think you need to do: