macOS下使用openmp

brew install llvm
brew install libomp

在cmake中添加

set(CMAKE_CXX_COMPILER "/usr/local/Cellar/llvm/8.0.0/bin/clang++")
add_executable(yourProject main.cpp ${CMAKE_CXX_COMPILER})

你可能感兴趣的:(macOS下使用openmp)