summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2013-06-11 20:50:38 (GMT)
committerAlex Neundorf <neundorf@kde.org>2013-06-11 20:50:38 (GMT)
commit22f7934a6e9c3dd350ec3ed6db91821783cd98a2 (patch)
treea5a290c07c2624c8088ee5b0cc0f6c376539e302 /Source
parenta2021e578c6b6c944b1d1442cfb76c3f9543c839 (diff)
downloadCMake-22f7934a6e9c3dd350ec3ed6db91821783cd98a2.zip
CMake-22f7934a6e9c3dd350ec3ed6db91821783cd98a2.tar.gz
CMake-22f7934a6e9c3dd350ec3ed6db91821783cd98a2.tar.bz2
Eclipse: fix #14204 and #14205: no file links to directories
If a source file name is empty, or if it is a directory, don't create a linked resource to it. Alex
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 6b02e15..d80e775 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -554,12 +554,15 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(
fileIt != sFiles.end();
++fileIt)
{
- std::string linkName4 = linkName3;
- linkName4 += "/";
- linkName4 +=
- cmSystemTools::GetFilenameName((*fileIt)->GetFullPath());
- this->AppendLinkedResource(fout, linkName4,
- (*fileIt)->GetFullPath(), LinkToFile);
+ std::string fullPath = (*fileIt)->GetFullPath();
+ if (!cmSystemTools::FileIsDirectory(fullPath.c_str()))
+ {
+ std::string linkName4 = linkName3;
+ linkName4 += "/";
+ linkName4 += cmSystemTools::GetFilenameName(fullPath);
+ this->AppendLinkedResource(fout, linkName4,
+ fullPath, LinkToFile);
+ }
}
}
}