[Cmake] .mm files in CMake

Yves Starreveld ystarrev at atamai.com
Mon Nov 25 22:14:08 EST 2002


Hi,

I recently tried to build vtk for Cocoa using the latest CMake, and got  
the following:

CMake Error: Unexpected file type  
/Users/ystarrev/Development/VTK/Rendering/ 
vtkCocoaRenderWindowInteractor.mm
CMake Error: Unexpected file type  
/Users/ystarrev/Development/VTK/Rendering/vtkCocoaRenderWindow.mm
CMake Error: Unexpected file type  
/Users/ystarrev/Development/VTK/Rendering/vtkCocoaWindow.mm
CMake Error: Unexpected file type  
/Users/ystarrev/Development/VTK/Rendering/vtkCocoaGLView.mm


.mm files are required to allow this to build, since they are ObjC++  
files (allow a mix of Objective C and C++ in the same file)

I added support for .M and .mm files to CMake in the past, but this  
appears to have stopped working.

Can anyone comment?

Could the problem be at line 54 of cmMakefile.cxx?

   this->AddSourceGroup("Source Files",  
"\\.(cpp|C|c|cxx|rc|def|r|odl|idl|hpj|bat)$");

not having M and mm in there?

THanks.

Clearly I need to add a .mm specific test to the regression tests run  
on Darwin...

Yves




More information about the CMake mailing list