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

reyman reyman64 at gmail.com
Wed Jul 29 19:21:45 EDT 2009


Hello,
I'm new on CMake, i have a project who compil with a simple Makefile, so i
want to translate into a CMakeList.

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.

But with this solution, objc include doesn't find when i launch my program
(sigfault sic) ..

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 ...

Is there a solution to force CMake to recognize the .m file ? like this in
my previous makefile :

.SUFFIXES: .m .xm

.m.o:
    $(OBJC) -c $(OBJCFLAGS) $(CPPFLAGS) $(DLLCPPFLAGS)

no google solution for this moment at this problem ..
Thanks a lot for your help !!!
Seb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090730/3868f71c/attachment.htm>


More information about the CMake mailing list