Installing gcc with OpenMP support on Mac using homebrew has no effect

删除回忆录丶 提交于 2019-12-05 06:31:19

If you can substitute clang for gcc I was able to get clang to compile OpenMP programs quite easily. I built the latest version of LLVM/clang and used homebrew to install libomp via brew install libomp.

Full steps were something like:

mkdir omp_clang && cd omp_clang

git clone https://github.com/llvm-mirror/llvm.git -b release_60
git clone https://github.com/llvm-mirror/clang.git llvm/tools/clang -b release_60

mkdir build && cd build
cmake ../llvm
make

brew install libomp

./bin/clang -fopenmp=libomp ~/openmp_program.c
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!