<br><br><div class="gmail_quote">On Thu, Jul 30, 2009 at 5:36 PM, Tyler Roscoe <span dir="ltr">&lt;<a href="mailto:tyler@cryptio.net">tyler@cryptio.net</a>&gt;</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>
&gt; I have file extension .m and .h in my src folder, my compiler is GCC.<br>
&gt; When i want to compile, this is /usr/bin/c++ who launch and compile ... i<br>
&gt; don&#39;t understand why CMake doesn&#39;t recognize the .m file and use the C<br>
&gt; 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&#39;m guessing CMake<br>
doesn&#39;t know that it should use gcc with .m files and is defaulting to<br>
C++ mode.<br>
<div class="im"><br>
&gt; If a try to modify CXX Compiler for gcc, i have &quot;stray error&quot; in all my<br>
&gt; 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>