[Openmp-dev] Using openmp in an Xcode command line project

Jan-Michael Tressler via Openmp-dev openmp-dev at lists.llvm.org
Fri Sep 30 23:15:43 PDT 2016


Hi,

I just wanted to share this with the group.  While I found Xcode - Homebrew directions, I didn’t find any Xcode - Macports directions.

This brief set of steps worked for me.

1. In Macports, I installed llvm clang 3.7 with openmp support:

	sudo port install llvm-3.7

	sudo port install ld64 +ld64_xcode

	sudo port install clang-3.7 +openmp

2. In Xcode project, I added user-defined settings ‘CC’ with value set to “/opt/local/bin/clang-mp-3.7”  (clang path).

3. Add “-fopenmp” to “Other C Flags”  

4. Open folder “/opt/local/lib/libomp” and drag libomp.dylib to Xcode project.  This will add the library to the project.

5. Test openmp functionality.


Hope this helps,
Jan-Michael

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20161001/9654a44b/attachment.html>


More information about the Openmp-dev mailing list