Merge topic 'EclipseFixBadLinkedResources'
4ea5dc5 Eclipse: fix #13358: don't create bad linked resources
This commit is contained in:
commit
20f56a7eed
@ -1334,12 +1334,26 @@ bool cmExtraEclipseCDT4Generator
|
|||||||
{
|
{
|
||||||
outputPath = this->HomeOutputDirectory + "/" + outputPath;
|
outputPath = this->HomeOutputDirectory + "/" + outputPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// in this case it's not necessary:
|
||||||
if (cmSystemTools::IsSubDirectory(outputPath.c_str(),
|
if (cmSystemTools::IsSubDirectory(outputPath.c_str(),
|
||||||
this->HomeOutputDirectory.c_str()))
|
this->HomeOutputDirectory.c_str()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// in these two cases Eclipse would complain:
|
||||||
|
if (cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(),
|
||||||
|
outputPath.c_str()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (cmSystemTools::GetRealPath(outputPath.c_str())
|
||||||
|
== cmSystemTools::GetRealPath(this->HomeOutputDirectory.c_str()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
std::string name = this->GetPathBasename(outputPath);
|
std::string name = this->GetPathBasename(outputPath);
|
||||||
|
|
||||||
// make sure linked resource name is unique
|
// make sure linked resource name is unique
|
||||||
|
Loading…
x
Reference in New Issue
Block a user