From 3e94f94b898aa183badd2ac8be52d20b007d5b26 Mon Sep 17 00:00:00 2001 From: Bastien Schatt Date: Tue, 18 Aug 2015 17:17:52 +0200 Subject: [PATCH] cmLocalVisualStudioGenerator: Use computed .obj extension (#13685) CMAKE__OUTPUT_EXTENSION tells us the proper extension for the current toolchain. Teach the ComputeObjectFilenames method to use GetLanguageOutputExtension to look up the extension instead of hard-coding ".obj". This is already done in the code path for explicit file names inside our call to GetObjectFileNameWithoutTarget. --- Source/cmLocalVisualStudioGenerator.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index ca7293993..358885326 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -57,7 +57,7 @@ void cmLocalVisualStudioGenerator::ComputeObjectFilenames( cmSourceFile const* sf = si->first; std::string objectNameLower = cmSystemTools::LowerCase( cmSystemTools::GetFilenameWithoutLastExtension(sf->GetFullPath())); - objectNameLower += ".obj"; + objectNameLower += this->GlobalGenerator->GetLanguageOutputExtension(*sf); counts[objectNameLower] += 1; } @@ -70,7 +70,7 @@ void cmLocalVisualStudioGenerator::ComputeObjectFilenames( cmSourceFile const* sf = si->first; std::string objectName = cmSystemTools::GetFilenameWithoutLastExtension(sf->GetFullPath()); - objectName += ".obj"; + objectName += this->GlobalGenerator->GetLanguageOutputExtension(*sf); if(counts[cmSystemTools::LowerCase(objectName)] > 1) { const_cast(gt)->AddExplicitObjectName(sf);