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.
This commit is contained in:
parent
a712575da1
commit
3e94f94b89
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue