<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>
&nbsp;&nbsp;We&#8217;ve just started building our OpenMP based code using Xcode on Mac OS X 10.6. &nbsp;When we build using Makefiles with OpenMP turned on (through the FindOpenMP.cmake module), all goes well. &nbsp;Under Xcode, however, we are not linking to the OpenMP libraries. &nbsp;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>
&lt;snip&gt;<BR>
/usr/bin/c++ &nbsp;&nbsp;&nbsp;&lt;snip&gt; &nbsp;-fopenmp <BR>
<BR>
<BR>
Under Xcode, the &#8211;fopenmp flag is missing. &nbsp;I suspected that the Makefiles are using OpenMP_CXX_FLAGS &#8220;under the hood&#8221;, but the same code is not being used by the Xcode generator. &nbsp;Can anyone help out with this issue?<BR>
<BR>
Cheers,<BR>
-dan<BR>
<BR>
P.S. &nbsp;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>