View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008968CMakeCMakepublic2009-05-05 17:062016-06-10 14:30
Reportergoatboy160 
Assigned ToBill Hoffman 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0008968: Set .h file type attribute correctly for Objective-C headers
Description.h files for objective-C are not set properly in xcode. This causes the editor to not properly highlight the code. Putting in the following patch fixes the issue for my usage, since my objective-c code is in a bundle.


Index: cmGlobalXCodeGenerator.cxx
===================================================================
--- cmGlobalXCodeGenerator.cxx (revision 30)
+++ cmGlobalXCodeGenerator.cxx (working copy)
@@ -575,7 +575,8 @@
   else if(ext == "h" || ext == "hxx" || ext == "hpp")
     {
     const char* linkLanguage = cmtarget.GetLinkerLanguage(this);
- if(linkLanguage && (std::string(linkLanguage) == "CXX"))
+ // Force bundles to have sourcecode.c.h for objective-C headers...
+ if(linkLanguage && (std::string(linkLanguage) == "CXX") && !cmtarget.GetPropertyAsBool("MACOSX_BUNDLE") )
       {
       sourcecode += ".cpp.h";
       }
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0017677)
Bill Hoffman (manager)
2009-09-21 13:20

But, you can have C++ bundles as well. Not sure we can do this patch...
(0022374)
goatboy160 (reporter)
2010-09-28 12:04

I believe this only changes the properties for the header when it's not in a bundle. The Bundle support has been inadequate in our current model for anything, so we've never been able to use it.
(0041552)
Kitware Robot (administrator)
2016-06-10 14:27

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2009-05-05 17:06 goatboy160 New Issue
2009-09-21 13:20 Bill Hoffman Note Added: 0017677
2009-09-21 13:20 Bill Hoffman Status new => assigned
2009-09-21 13:20 Bill Hoffman Assigned To => Bill Hoffman
2010-09-28 12:04 goatboy160 Note Added: 0022374
2016-06-10 14:27 Kitware Robot Note Added: 0041552
2016-06-10 14:27 Kitware Robot Status assigned => resolved
2016-06-10 14:27 Kitware Robot Resolution open => moved
2016-06-10 14:30 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team