BUG: Duplicate object name detection should not be case sensitive since this code is used on Windows file systems. This addresses bug#3589.
This commit is contained in:
parent
67e1f90956
commit
6ad36e407e
@ -55,7 +55,8 @@ void cmLocalVisualStudioGenerator::ComputeObjectNameRequirements
|
|||||||
// Clear the current set of requirements.
|
// Clear the current set of requirements.
|
||||||
this->NeedObjectName.clear();
|
this->NeedObjectName.clear();
|
||||||
|
|
||||||
// Count the number of object files with each name.
|
// Count the number of object files with each name. Note that
|
||||||
|
// windows file names are not case sensitive.
|
||||||
std::map<cmStdString, int> objectNameCounts;
|
std::map<cmStdString, int> objectNameCounts;
|
||||||
for(unsigned int i = 0; i < sourceGroups.size(); ++i)
|
for(unsigned int i = 0; i < sourceGroups.size(); ++i)
|
||||||
{
|
{
|
||||||
@ -68,8 +69,9 @@ void cmLocalVisualStudioGenerator::ComputeObjectNameRequirements
|
|||||||
if(this->SourceFileCompiles(sf))
|
if(this->SourceFileCompiles(sf))
|
||||||
{
|
{
|
||||||
std::string objectName =
|
std::string objectName =
|
||||||
cmSystemTools::GetFilenameWithoutLastExtension(
|
cmSystemTools::LowerCase(
|
||||||
sf->GetFullPath().c_str());
|
cmSystemTools::GetFilenameWithoutLastExtension(
|
||||||
|
sf->GetFullPath().c_str()));
|
||||||
objectName += ".obj";
|
objectName += ".obj";
|
||||||
objectNameCounts[objectName] += 1;
|
objectNameCounts[objectName] += 1;
|
||||||
}
|
}
|
||||||
@ -89,8 +91,9 @@ void cmLocalVisualStudioGenerator::ComputeObjectNameRequirements
|
|||||||
if(this->SourceFileCompiles(sf))
|
if(this->SourceFileCompiles(sf))
|
||||||
{
|
{
|
||||||
std::string objectName =
|
std::string objectName =
|
||||||
cmSystemTools::GetFilenameWithoutLastExtension(
|
cmSystemTools::LowerCase(
|
||||||
sf->GetFullPath().c_str());
|
cmSystemTools::GetFilenameWithoutLastExtension(
|
||||||
|
sf->GetFullPath().c_str()));
|
||||||
objectName += ".obj";
|
objectName += ".obj";
|
||||||
if(objectNameCounts[objectName] > 1)
|
if(objectNameCounts[objectName] > 1)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user