diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 384098a0f..6ae073b56 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -704,7 +704,14 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen, } else { - sourceFiles.push_back(xsf); + // Include this file in the build if it has a known language + // and has not been listed as an ignored extension for this + // generator. + if(this->CurrentLocalGenerator->GetSourceFileLanguage(**i) && + !this->IgnoreFile((*i)->GetExtension().c_str())) + { + sourceFiles.push_back(xsf); + } } }