Skip to content

Commit

Permalink
Fix build issue on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
titsuki committed Aug 26, 2023
1 parent 8f2d809 commit 9a8514a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Algorithm/XGBoost/CustomBuilder.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ class Algorithm::XGBoost::CustomBuilder:ver<0.0.5>:auth<cpan:TITSUKI> is Distrib
my $archive-file-with-cwd = $*CWD.add($archive-file);
my $extract-dir = $extractor.extract(Candidate.new(:uri($archive-file-with-cwd)), $*CWD);
chdir("xgboost");
when self!is-osx { shell("brew install libomp && cmake . && make") }
when self!is-osx {
my $fh = open :w, "./cmake/xgboost-config.cmake.in";
$fh.say: "../../misc/xgboost-config.cmake.in".IO.slurp;
$fh.close;
shell("brew install libomp && cmake . && make")
}
when self!is-linux { shell("cmake . && make") }
}
method !is-osx(--> Bool) { shell("uname", :out).out.slurp.trim.lc eq "darwin" }
Expand Down

0 comments on commit 9a8514a

Please sign in to comment.