<br><br><div class="gmail_quote">On Thu, Jul 30, 2009 at 5:36 PM, Tyler Roscoe <span dir="ltr"><<a href="mailto:tyler@cryptio.net">tyler@cryptio.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Thu, Jul 30, 2009 at 01:21:45AM +0200, reyman wrote:<br>
> I have file extension .m and .h in my src folder, my compiler is GCC.<br>
> When i want to compile, this is /usr/bin/c++ who launch and compile ... i<br>
> don't understand why CMake doesn't recognize the .m file and use the C<br>
> compilator gcc.<br>
</div></blockquote><div><br>Finaly i have find a solution with this code src :<br><br>file(<br> GLOB_RECURSE<br> source_files<br> src/*.h<br> src/*.m<br> src/*.c<br>)<br><br>SET_SOURCE_FILES_PROPERTIES(<br>
${source_files}<br> PROPERTIES LANGUAGE C<br>)<br><br>gcc -x objective-c produce stray error with LD linking, but gcc without this option running without LD error.<br>Objective-c compiler (gcc) is ok with this.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><br>
</div>Have you tried playing with enable_language()? I'm guessing CMake<br>
doesn't know that it should use gcc with .m files and is defaulting to<br>
C++ mode.<br>
<div class="im"><br>
> If a try to modify CXX Compiler for gcc, i have "stray error" in all my<br>
> source file when LD link the .o ... So, a very bad solution ...<br>
<br>
</div>How did you modify the compiler?<br>
<font color="#888888"><br>
tyler<br>
</font></blockquote></div><br>Thanks lot for your response tyler :]<br>Seb.<br><br>