As explained in the doc
brew install gcc --without-multilib
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost; cp make/config.mk ./config.mk
Open and modify CC and CXX parameters in config.mk, for example:
CC=/usr/local/bin/gcc-7
CXX=/usr/local/bin/g++-7
Next step, run make :
make -j4
mkdir build; cd $_
cmake .. -DCMAKE_C_COMPILER=/usr/local/bin/gcc-7 -DCMAKE_CXX_COMPILER=/usr/local/bin/g++-7 -DCMAKE_BUILD_TYPE=Release
make -j4
Problem is with clang, openmp support and nvcc. Ended up with error :
nvcc : fatal GNU C/C++ compiler is no longer supported as a host compiler on Mac OS X.
Last version of clang 4.0.0 is not neither supported by nvcc.