summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2013-08-29 18:43:54 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2013-11-19 16:48:18 (GMT)
commit4a352d43bbe3c8726046683e7dbc89a55b5e1c67 (patch)
tree8d1873725ec19a5ef1023ee6370de7155f5cd416 /Source
parent1da77bf1ee4f3ba315ebb00da2eaeac474614cad (diff)
downloadCMake-4a352d43bbe3c8726046683e7dbc89a55b5e1c67.zip
CMake-4a352d43bbe3c8726046683e7dbc89a55b5e1c67.tar.gz
CMake-4a352d43bbe3c8726046683e7dbc89a55b5e1c67.tar.bz2
Notify extra generators about languages
Some generators can use the any enabled languages to add extra support in the relevant build tool. One such is Eclipse since there are many plugins available for various languages.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExternalMakefileProjectGenerator.cxx6
-rw-r--r--Source/cmExternalMakefileProjectGenerator.h2
-rw-r--r--Source/cmGlobalGenerator.cxx5
3 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmExternalMakefileProjectGenerator.cxx b/Source/cmExternalMakefileProjectGenerator.cxx
index 9c965cc..0d42c35 100644
--- a/Source/cmExternalMakefileProjectGenerator.cxx
+++ b/Source/cmExternalMakefileProjectGenerator.cxx
@@ -13,6 +13,12 @@
#include "cmExternalMakefileProjectGenerator.h"
+void cmExternalMakefileProjectGenerator
+::EnableLanguage(std::vector<std::string> const&,
+ cmMakefile *, bool)
+{
+}
+
std::string cmExternalMakefileProjectGenerator::CreateFullGeneratorName(
const char* globalGenerator,
const char* extraGenerator)
diff --git a/Source/cmExternalMakefileProjectGenerator.h b/Source/cmExternalMakefileProjectGenerator.h
index 182c1a8..bce441d 100644
--- a/Source/cmExternalMakefileProjectGenerator.h
+++ b/Source/cmExternalMakefileProjectGenerator.h
@@ -41,6 +41,8 @@ public:
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry,
const char* fullName) const = 0;
+ virtual void EnableLanguage(std::vector<std::string> const& languages,
+ cmMakefile *, bool optional);
///! set the global generator which will generate the makefiles
virtual void SetGlobalGenerator(cmGlobalGenerator* generator)
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 65a7118..56db0ef 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -695,6 +695,11 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
{
mf->ReadListFile(0,projectCompatibility.c_str());
}
+ // Inform any extra generator of the new language.
+ if (this->ExtraGenerator)
+ {
+ this->ExtraGenerator->EnableLanguage(languages, mf, false);
+ }
if(fatalError)
{