<HTML>
<HEAD>
<TITLE>OpenMP differences between command line and Xcode</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi,<BR>
<BR>
We’ve just started building our OpenMP based code using Xcode on Mac OS X 10.6. When we build using Makefiles with OpenMP turned on (through the FindOpenMP.cmake module), all goes well. Under Xcode, however, we are not linking to the OpenMP libraries. I tracked this down to a difference in the final link line.<BR>
<BR>
Under Makefiles we have:<BR>
<BR>
Linking CXX executable ../bin/NoOp<BR>
<snip><BR>
/usr/bin/c++ <snip> -fopenmp <BR>
<BR>
<BR>
Under Xcode, the –fopenmp flag is missing. I suspected that the Makefiles are using OpenMP_CXX_FLAGS “under the hood”, but the same code is not being used by the Xcode generator. Can anyone help out with this issue?<BR>
<BR>
Cheers,<BR>
-dan<BR>
<BR>
P.S. The simple workaround is to set<BR>
CMAKE_EXE_LINKER_FLAGS:STRING=-fopenmp<BR>
in CMakeCache.txt<BR>
<BR>
<BR>
-- <BR>
<B>Daniel Blezek, PhD<BR>
</B>Medical Imaging Informatics Innovation Center<BR>
<BR>
P 127 or (77) 8 8886<BR>
T 507 538 8886<BR>
E <a href="blezek.daniel@mayo.edu">blezek.daniel@mayo.edu</a><BR>
<BR>
Mayo Clinic<BR>
200 First St. S.W.<BR>
Harwick SL-44<BR>
Rochester, MN 55905<BR>
mayoclinic.org<BR>
<BR>
</SPAN></FONT>
</BODY>
</HTML>