[CMake] OpenMP differences between command line and Xcode
    Daniel Blezek 
    Blezek.Daniel at mayo.edu
       
    Tue Jun  8 17:27:18 EDT 2010
    
    
  
Hi,
  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.
Under Makefiles we have:
Linking CXX executable ../bin/NoOp
<snip>
/usr/bin/c++    <snip>  -fopenmp
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?
Cheers,
-dan
P.S.  The simple workaround is to set
CMAKE_EXE_LINKER_FLAGS:STRING=-fopenmp
in CMakeCache.txt
-- 
Daniel Blezek, PhD
Medical Imaging Informatics Innovation Center
P 127 or (77) 8 8886
T 507 538 8886
E blezek.daniel at mayo.edu
Mayo Clinic
200 First St. S.W.
Harwick SL-44
Rochester, MN 55905
mayoclinic.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100608/6f3a8dd9/attachment-0001.htm>
    
    
More information about the CMake
mailing list