summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraEclipseCDT4Generator.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2013-08-29 18:51:59 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2013-11-19 16:48:19 (GMT)
commita990722b5a8fc15058e7024ec54885ec24ed4bbf (patch)
tree3ddf0c80cf389cc89adbbb0cb7c89e58b2fe85bf /Source/cmExtraEclipseCDT4Generator.cxx
parent51726cce64ee8bce1115f3c6d092b4ae6f43d714 (diff)
downloadCMake-a990722b5a8fc15058e7024ec54885ec24ed4bbf.zip
CMake-a990722b5a8fc15058e7024ec54885ec24ed4bbf.tar.gz
CMake-a990722b5a8fc15058e7024ec54885ec24ed4bbf.tar.bz2
eclipse: Support custom natures via a global property
This is useful for enabling natures not recognized by the Eclipse generator directly in a project.
Diffstat (limited to 'Source/cmExtraEclipseCDT4Generator.cxx')
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index effc38c..755b445 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -465,6 +465,18 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
fout << "\t\t<nature>" << *nit << "</nature>\n";
}
+ if (const char *extraNaturesProp = mf->GetCMakeInstance()->
+ GetProperty("ECLIPSE_EXTRA_NATURES", cmProperty::GLOBAL))
+ {
+ std::vector<std::string> extraNatures;
+ cmSystemTools::ExpandListArgument(extraNaturesProp, extraNatures);
+ for (std::vector<std::string>::const_iterator nit = extraNatures.begin();
+ nit != extraNatures.end(); ++nit)
+ {
+ fout << "\t\t<nature>" << *nit << "</nature>\n";
+ }
+ }
+
fout << "\t</natures>\n";
fout << "\t<linkedResources>\n";