Merge topic 'vs-fix-obj-extension'

3e94f94b cmLocalVisualStudioGenerator: Use computed .obj extension (#13685)
This commit is contained in:
Brad King 2015-08-21 09:28:58 -04:00 committed by CMake Topic Stage
commit cecd0d186d

View File

@ -57,7 +57,7 @@ void cmLocalVisualStudioGenerator::ComputeObjectFilenames(
cmSourceFile const* sf = si->first; cmSourceFile const* sf = si->first;
std::string objectNameLower = cmSystemTools::LowerCase( std::string objectNameLower = cmSystemTools::LowerCase(
cmSystemTools::GetFilenameWithoutLastExtension(sf->GetFullPath())); cmSystemTools::GetFilenameWithoutLastExtension(sf->GetFullPath()));
objectNameLower += ".obj"; objectNameLower += this->GlobalGenerator->GetLanguageOutputExtension(*sf);
counts[objectNameLower] += 1; counts[objectNameLower] += 1;
} }
@ -70,7 +70,7 @@ void cmLocalVisualStudioGenerator::ComputeObjectFilenames(
cmSourceFile const* sf = si->first; cmSourceFile const* sf = si->first;
std::string objectName = std::string objectName =
cmSystemTools::GetFilenameWithoutLastExtension(sf->GetFullPath()); cmSystemTools::GetFilenameWithoutLastExtension(sf->GetFullPath());
objectName += ".obj"; objectName += this->GlobalGenerator->GetLanguageOutputExtension(*sf);
if(counts[cmSystemTools::LowerCase(objectName)] > 1) if(counts[cmSystemTools::LowerCase(objectName)] > 1)
{ {
const_cast<cmGeneratorTarget*>(gt)->AddExplicitObjectName(sf); const_cast<cmGeneratorTarget*>(gt)->AddExplicitObjectName(sf);