lightgbm 2.2.3 (new formula)
Closes #43244. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
354529807f
commit
92fda6fbf1
1 changed files with 34 additions and 0 deletions
34
Formula/lightgbm.rb
Normal file
34
Formula/lightgbm.rb
Normal file
|
@ -0,0 +1,34 @@
|
|||
class Lightgbm < Formula
|
||||
desc "Fast, distributed, high performance gradient boosting framework"
|
||||
homepage "https://github.com/microsoft/LightGBM"
|
||||
url "https://github.com/microsoft/LightGBM/archive/v2.2.3.tar.gz"
|
||||
sha256 "4a6414e808b343a784f0ee805ac723c094488f9e9a951dd3f709dc31ffb4ea4c"
|
||||
|
||||
depends_on "cmake" => :build
|
||||
depends_on "libomp"
|
||||
|
||||
def install
|
||||
mkdir "build" do
|
||||
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"
|
||||
args << "-DAPPLE_OUTPUT_DYLIB=ON"
|
||||
|
||||
system "cmake", *args, ".."
|
||||
system "make"
|
||||
system "make", "install"
|
||||
end
|
||||
pkgshare.install "examples"
|
||||
end
|
||||
|
||||
test do
|
||||
cp_r (pkgshare/"examples/regression"), testpath
|
||||
cd "regression" do
|
||||
system "#{bin}/lightgbm", "config=train.conf"
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue