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.
This commit is contained in:
Ben Boeckel 2013-08-29 14:43:54 -04:00
parent 1da77bf1ee
commit 4a352d43bb
3 changed files with 13 additions and 0 deletions

View File

@ -13,6 +13,12 @@
#include "cmExternalMakefileProjectGenerator.h" #include "cmExternalMakefileProjectGenerator.h"
void cmExternalMakefileProjectGenerator
::EnableLanguage(std::vector<std::string> const&,
cmMakefile *, bool)
{
}
std::string cmExternalMakefileProjectGenerator::CreateFullGeneratorName( std::string cmExternalMakefileProjectGenerator::CreateFullGeneratorName(
const char* globalGenerator, const char* globalGenerator,
const char* extraGenerator) const char* extraGenerator)

View File

@ -41,6 +41,8 @@ public:
/** Get the documentation entry for this generator. */ /** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry, virtual void GetDocumentation(cmDocumentationEntry& entry,
const char* fullName) const = 0; 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 ///! set the global generator which will generate the makefiles
virtual void SetGlobalGenerator(cmGlobalGenerator* generator) virtual void SetGlobalGenerator(cmGlobalGenerator* generator)

View File

@ -695,6 +695,11 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
{ {
mf->ReadListFile(0,projectCompatibility.c_str()); 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) if(fatalError)
{ {