lilidan / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

cmake generator should handle objective-c and objective-c++ files #451

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use the cmake generator on a gyp project that includes obj-c or obj-c++ 
(e.g., the webrtc source: https://code.google.com/p/webrtc/)

What is the expected output? What do you see instead?
".mm" and ".m" files get added as header-only files, when they should really be 
compiled

Please provide any additional information below.

Simple patch:

Index: pylib/gyp/generator/cmake.py
===================================================================
--- pylib/gyp/generator/cmake.py    (revision 1967)
+++ pylib/gyp/generator/cmake.py    (working copy)
@@ -67,6 +67,8 @@
   '.cxx': 'cxx',
   '.s': 's', # cc
   '.S': 's', # cc
+  '.m': '.cc',
+  '.mm': '.cxx',
 }

Original issue reported on code.google.com by tomtheen...@gmail.com on 2 Sep 2014 at 11:43