summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraEclipseCDT4Generator.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-10-31 20:33:36 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-10-31 20:33:36 (GMT)
commit0b9dac6cbc15acfb8df01e5b6dd5284c4a42fe9a (patch)
treeb09777a6f9df48c2445ccb5da83aa75ac3681b27 /Source/cmExtraEclipseCDT4Generator.cxx
parent72632f885c904d8d76de47f284086eea02c4567e (diff)
parentfbda95883c3a86e5b808c78fa433bd9dbcc93754 (diff)
downloadCMake-0b9dac6cbc15acfb8df01e5b6dd5284c4a42fe9a.zip
CMake-0b9dac6cbc15acfb8df01e5b6dd5284c4a42fe9a.tar.gz
CMake-0b9dac6cbc15acfb8df01e5b6dd5284c4a42fe9a.tar.bz2
Merge topic 'EclipseNoLinkedResources'
fbda958 Eclipse: add switch to disable linked resources (#13189)
Diffstat (limited to 'Source/cmExtraEclipseCDT4Generator.cxx')
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 96b8a09..7464657 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -38,6 +38,7 @@ cmExtraEclipseCDT4Generator
this->SupportedGlobalGenerators.push_back("Unix Makefiles");
this->SupportsVirtualFolders = true;
+ this->GenerateLinkedResources = true;
}
//----------------------------------------------------------------------------
@@ -83,6 +84,9 @@ void cmExtraEclipseCDT4Generator::Generate()
this->HomeDirectory = mf->GetHomeDirectory();
this->HomeOutputDirectory = mf->GetHomeOutputDirectory();
+ this->GenerateLinkedResources = mf->IsOn(
+ "CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES");
+
this->IsOutOfSourceBuild = (this->HomeDirectory!=this->HomeOutputDirectory);
this->GenerateSourceProject = (this->IsOutOfSourceBuild &&
@@ -501,6 +505,10 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(
linkName2 += ti->first;
this->AppendLinkedResource(fout, linkName2, "virtual:/virtual",
VirtualFolder);
+ if (!this->GenerateLinkedResources)
+ {
+ break; // skip generating the linked resources to the source files
+ }
std::vector<cmSourceGroup> sourceGroups=makefile->GetSourceGroups();
// get the files from the source lists then add them to the groups
cmTarget* tgt = const_cast<cmTarget*>(&ti->second);
@@ -555,6 +563,11 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(
void cmExtraEclipseCDT4Generator::CreateLinksToSubprojects(
cmGeneratedFileStream& fout, const std::string& baseDir)
{
+ if (!this->GenerateLinkedResources)
+ {
+ return;
+ }
+
// for each sub project create a linked resource to the source dir
// - only if it is an out-of-source build
this->AppendLinkedResource(fout, "[Subprojects]",