From 6ef56f777803ac6e90699a12636d0133b94b9312 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 8 Jul 2009 13:03:34 -0400 Subject: 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. --- Source/cmGlobalXCodeGenerator.cxx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 3437d22..3d5291a 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/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) { -- cgit v0.12