summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2013-08-29 14:43:54 -0400
committerBen Boeckel <ben.boeckel@kitware.com>2013-11-19 11:48:18 -0500
commit4a352d43bbe3c8726046683e7dbc89a55b5e1c67 (patch)
tree8d1873725ec19a5ef1023ee6370de7155f5cd416 /Source
parent1da77bf1ee4f3ba315ebb00da2eaeac474614cad (diff)
downloadcmake-4a352d43bbe3c8726046683e7dbc89a55b5e1c67.tar.gz
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 9c965cc24a..0d42c35957 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 182c1a8f6f..bce441dba2 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 65a7118afe..56db0ef30a 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)
{