Commit 27343e3b authored by Brad King's avatar Brad King
Browse files

cmGlobalGenerator: Finish storing enabled languages in cmState

In commit 74de9a73

 (cmGlobalGenerator: Delegate storage of enabled
languages to cmState, 2015-04-11) the original LanguageEnabled
member of cmGlobalGenerator was left behind by mistake.  One use
of it in EnableLanguagesFromGenerator (for try_compile) was left,
but the member is not populated anymore.  Drop the member and
teach EnableLanguagesFromGenerator to copy the list of enabled
languages from one cmState to the other.
Reported-by: Matt McCormick's avatarMatt McCormick <>
parent 8469b6f6
......@@ -1896,7 +1896,9 @@ void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator *gen,
"make program",
// copy the enabled languages
this->LanguageEnabled = gen->LanguageEnabled;
this->LanguagesReady = gen->LanguagesReady;
this->ExtensionToLanguage = gen->ExtensionToLanguage;
this->IgnoreExtensions = gen->IgnoreExtensions;
......@@ -441,7 +441,6 @@ private:
// If you add a new map here, make sure it is copied
// in EnableLanguagesFromGenerator
std::map<std::string, bool> IgnoreExtensions;
std::vector<std::string> LanguageEnabled;
std::set<std::string> LanguagesReady; // Ready for try_compile
std::map<std::string, std::string> OutputExtensions;
std::map<std::string, std::string> LanguageToOutputExtension;
......@@ -272,6 +272,11 @@ std::vector<std::string> cmState::GetEnabledLanguages() const
return this->EnabledLanguages;
void cmState::SetEnabledLanguages(std::vector<std::string> const& langs)
this->EnabledLanguages = langs;
void cmState::ClearEnabledLanguages()
......@@ -77,6 +77,7 @@ public:
void SetLanguageEnabled(std::string const& l);
bool GetLanguageEnabled(std::string const& l) const;
std::vector<std::string> GetEnabledLanguages() const;
void SetEnabledLanguages(std::vector<std::string> const& langs);
void ClearEnabledLanguages();
bool GetIsInTryCompile() const;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment