[Openmp-dev] Using openmp in an Xcode command line project
Andrey Bokhanko via Openmp-dev
openmp-dev at lists.llvm.org
Mon Oct 17 07:16:21 PDT 2016
Hi Jan-Michael,
Thank you for summarizing and posting this -- I'm sure this will come handy
for quite a few people!
Yours,
Andrey
On Sat, Oct 1, 2016 at 9:28 AM, Jan-Michael Tressler via Openmp-dev <
openmp-dev at lists.llvm.org> wrote:
> Hi,
>
> Sorry, but I forgot to add a couple steps.
>
> 5. Set "Enable Modules (C and Objective-C" to NO
>
> 6. Add “/opt/local/include” to “Header Search Paths” Add
> “/opt/local/lib” to “Library Search Paths”.
>
> 7. OpenMP headers can be added via: #include <libomp/omp.h>
>
> Thanks,
> Jan-Michael
>
>
> On Fri, Sep 30, 2016 at 11:17 PM, Jan-Michael Tressler <jtressle at gmail.com
> > wrote:
>
>> 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
>>
>>
>
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20161017/a0f3174d/attachment.html>
More information about the Openmp-dev
mailing list