I am trying to install a package on R called XBART. I use RStudio as my IDE, and am installing in the console: 'install_github("jingyuhe/XBART")'. The package requires a C++ compiler, and I am using clang++. However, I keep getting the following error:
clang: error: unsupported option '-fopenmp'
From searching around, it seems that the Apple clang doesn't support OpenMP, which is why I am getting this error. I've tried to install an outside clang ('brew install llvm') and OpenMP ('brew install libomp'). It keeps using the Apple version of clang for the download, though. How do I make R use this outside compiler for the download instead of the Apple version?