-
Notifications
You must be signed in to change notification settings - Fork 520
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
Add OpenMP as CMake target #586
Conversation
af7f183
to
26819d7
Compare
f1c1103
to
12aec58
Compare
Sorry for the noise. I'm now done ironing out all loose ends. This PR is now ready for review. |
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.
Not sure if testing against gcc on OSX is required with dmlc-core.
@trivialfis Do you mean that we should remove unittest_gtest for OSX? |
@hcho3 No. I see package |
@trivialfis I put back gcc. Now dmlc-core is tested against both gcc and Apple Clang. |
947d270
to
25bcdec
Compare
sorry I missed this LGTM |
Simplify logic for importing OpenMP into the CMake build by treating OpenMP as a target. This way, we no longer have to set compiler flags to enable OpenMP. See https://cliutils.gitlab.io/modern-cmake/chapters/packages/OpenMP.html for more information.
@dmlc/dmlc-core-committer @trivialfis Please help review. This will be especially useful for Mac OSX users. The old way requires them to use Homebrew GCC, which is a heavy dependency (*). The new way allows them to use Apple Clang (default system compiler) instead.
(*) See discussion at Homebrew/homebrew-core#43246, where Homebrew maintainers asked to remove GCC dependency from XGBoost.