Skip to content

Instantly share code, notes, and snippets.

@overheadhunter
Last active August 29, 2015 14:18
Show Gist options
  • Save overheadhunter/aa64283f33acd6efc23f to your computer and use it in GitHub Desktop.
Save overheadhunter/aa64283f33acd6efc23f to your computer and use it in GitHub Desktop.
Using clang-omp with Xcode
  1. Install clang-omp using homebrew: brew install clang-omp
  2. Create a new Xcode project.
  3. Under Build Settings
    • add a new user-defined setting CC with the value /usr/local/bin/clang-omp
    • Add -fopenmp to Other C Flags
    • Add /usr/local/include to Header Search Paths
    • Set Enable Modules (C and Objective-C) to No
  4. Under Build Phases
    • Add /usr/local/lib/libiomp5.dylib to Link Binary With Libraries

Done.

You can now #include <libiomp/omp.h> and start using #pragma omp ... in your source code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment