summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorBastien Schatt <bastien.schatt@magestik.fr>2015-08-18 15:17:52 (GMT)
committerBrad King <brad.king@kitware.com>2015-08-18 15:39:52 (GMT)
commit3e94f94b898aa183badd2ac8be52d20b007d5b26 (patch)
treee12195029055e870d4ebd066c1b4fb8c52cf3cae /Source/cmLocalVisualStudioGenerator.cxx
parenta712575da1a0e6117c4682100e3b9df72b964b2a (diff)
downloadCMake-3e94f94b898aa183badd2ac8be52d20b007d5b26.zip
CMake-3e94f94b898aa183badd2ac8be52d20b007d5b26.tar.gz
CMake-3e94f94b898aa183badd2ac8be52d20b007d5b26.tar.bz2
cmLocalVisualStudioGenerator: Use computed .obj extension (#13685)
CMAKE_<LANG>_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.
Diffstat (limited to 'Source/cmLocalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index ca72939..3588853 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<cmGeneratorTarget*>(gt)->AddExplicitObjectName(sf);