View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0007045 | CMake | CMake | public | 2008-05-18 23:57 | 2008-08-19 15:55 | ||||
Reporter | Eric Wing | ||||||||
Assigned To | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake-2-6 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0007045: CMake compiles Obj-C (.m) files with g++ instead of gcc (Mac) | ||||||||
Description | I noticed that .m files are being compiled with g++ instead of gcc in non-C++ projects in the Makefile generator. The .m is for Objective-C, the .mm is for Objective-C++. In the former case, gcc should be used, not g++. This gives me linking problems in certain cases, presumably dealing with C++ name mangling, gcc incompatibility (such as linking stuff compiled with gcc 3.3 vs gcc 4.0), or stricter type checking. Attached are two simple test programs, one with .m, the other with .mm. With the Makefiles, gcc should be invoked in the .m test. g++ should be invoked (as it is now) with the .mm file. The Xcode generator does the correct thing. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | HelloObjC.tar.gz [^] (726 bytes) 2008-05-18 23:57 | ||||||||
Relationships | |
Relationships |
Notes | |
(0013082) Bill Hoffman (manager) 2008-08-19 15:55 |
cvs commit -m "BUG: fix for 7045, use gcc for .m" cmSystemTools.cxx Committer: Bill Hoffman <bill.hoffman@kitware.com> /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v <-- cmSystemTools.cxx new revision: 1.384; previous revision: 1.383 |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2008-05-18 23:57 | Eric Wing | New Issue | |
2008-05-18 23:57 | Eric Wing | File Added: HelloObjC.tar.gz | |
2008-08-19 15:55 | Bill Hoffman | Status | new => closed |
2008-08-19 15:55 | Bill Hoffman | Note Added: 0013082 | |
2008-08-19 15:55 | Bill Hoffman | Resolution | open => fixed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |