diff options
author | Brad King <brad.king@kitware.com> | 2009-07-08 17:03:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-07-08 17:03:34 (GMT) |
commit | 6ef56f777803ac6e90699a12636d0133b94b9312 (patch) | |
tree | 94201c7626cc1730670561078608555896c054d5 /Source/cmGlobalXCodeGenerator.cxx | |
parent | 2b5d97419f3c0f09575b9f8b7afd2f328e769554 (diff) | |
download | CMake-6ef56f777803ac6e90699a12636d0133b94b9312.zip CMake-6ef56f777803ac6e90699a12636d0133b94b9312.tar.gz CMake-6ef56f777803ac6e90699a12636d0133b94b9312.tar.bz2 |
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.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 16 |
1 files 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) { |