- Install clang-omp using homebrew:
brew install clang-omp - Create a new Xcode project.
- Under Build Settings
- add a new user-defined setting CC with the value
/usr/local/bin/clang-omp - Add
-fopenmpto Other C Flags - Add
/usr/local/includeto Header Search Paths - Set Enable Modules (C and Objective-C) to
No
- add a new user-defined setting CC with the value
- Under Build Phases
- Add
/usr/local/lib/libiomp5.dylibto Link Binary With Libraries
- Add
Done.
You can now #include <libiomp/omp.h> and start using #pragma omp ... in your source code.