OpenMP in Clang compiler

so here is the problem, newest Xcode 5.0 uses Clang as default C/C++ compiler, so I went to the makefile of “cudaOpenMP” (CUDA sample) to see how OpenMP is detected. I run the code with Clang as default compiler (the GCC didn’t work when I tried) even though it is not Maverick yet, and got a message from Clang

clang: warning: argument unused during compilation: '-fopenmp'

however there is NO msg “WARNING - CUDA OpenMP Libraries are not found” showed up.

so my questions here:
1.does it means that OpenMP is detected? where is it exactly? is it in “/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/” ?
2.why “-fopenmp” is detected as unused?


Hi xnov,

   After Xcode 5.0 uses Clang as its only compiler, my life becomes tough. I found this poster when I was searching for solutions to use openmp in the latest Xcode. 

   I am not familiar with cuda, but I can tell you that openmp is not supported in clang compiler. That's why you are prompted with the above warning. If you use clang to compile your code, everything would be fine except you cannot  gain the efficiency of multithreading. You program will be single-threaded.