MantisBT - CMake | |||||
View Issue Details | |||||
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. | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | HelloObjC.tar.gz (726) 2008-05-18 23:57 https://public.kitware.com/Bug/file/1472/HelloObjC.tar.gz | ||||
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 |
Notes | |||||
|
|||||
|
|