Browse Source

ENH: Use fixed header file type mapping for Xcode

This simplifies computation of the lastKnownFileType attribute for
header files in Xcode projects.  We now use a fixed mapping from
header file extension to attribute value.  The value is just a hint to
the Xcode editor, so computing the target linker language is overkill.
Brad King 16 years ago
parent
commit
6ef56f7778
1 changed files with 6 additions and 10 deletions
  1. 6 10
      Source/cmGlobalXCodeGenerator.cxx

+ 6 - 10
Source/cmGlobalXCodeGenerator.cxx

@@ -633,17 +633,13 @@ cmGlobalXCodeGenerator::CreateXCodeFileReference(cmSourceFile* sf,
     {
     sourcecode += ".text.plist";
     }
-  else if(ext == "h" || ext == "hxx" || ext == "hpp")
+  else if(ext == "h")
     {
-    const char* linkLanguage = cmtarget.GetLinkerLanguage();
-    if(linkLanguage && (std::string(linkLanguage) == "CXX"))
-      {
-      sourcecode += ".cpp.h";
-      }
-    else
-      {
-      sourcecode += ".c.h";
-      }
+    sourcecode += ".c.h";
+    }
+  else if(ext == "hxx" || ext == "hpp" || ext == "txx")
+    {
+    sourcecode += ".cpp.h";
     }
   else if(lang && strcmp(lang, "CXX") == 0)
     {