[CMake] Problem with CMAKE and m file for Objective-c

Tyler Roscoe tyler at cryptio.net
Thu Jul 30 11:36:30 EDT 2009


On Thu, Jul 30, 2009 at 01:21:45AM +0200, reyman wrote:
> I have file extension .m and .h in my src folder, my compiler is GCC.
> When i want to compile, this is /usr/bin/c++ who launch and compile ... i
> don't understand why CMake doesn't recognize the .m file and use the C
> compilator gcc.

Have you tried playing with enable_language()? I'm guessing CMake
doesn't know that it should use gcc with .m files and is defaulting to
C++ mode.

> If a try to modify CXX Compiler for gcc, i have "stray error" in all my
> source file when LD link the .o ... So, a very bad solution ...

How did you modify the compiler?

tyler


More information about the CMake mailing list