diff options
author | Brad King <brad.king@kitware.com> | 2015-05-01 17:16:12 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-05-01 17:16:12 (GMT) |
commit | a588d1ee99a2996e0b42b9d7c43e41e3d54b31c8 (patch) | |
tree | 2d32e037f2722ff9d4e6c84742daa50679b25b95 | |
parent | c1081a45d52598e6000341595d138048d5b79fc2 (diff) | |
parent | 27343e3b68e0aa0c923f1ad666575ed40efed211 (diff) | |
download | CMake-a588d1ee99a2996e0b42b9d7c43e41e3d54b31c8.zip CMake-a588d1ee99a2996e0b42b9d7c43e41e3d54b31c8.tar.gz CMake-a588d1ee99a2996e0b42b9d7c43e41e3d54b31c8.tar.bz2 |
Merge topic 'fix-cmState-try_compile-languages'
27343e3b cmGlobalGenerator: Finish storing enabled languages in cmState
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.h | 1 | ||||
-rw-r--r-- | Source/cmState.cxx | 5 | ||||
-rw-r--r-- | Source/cmState.h | 1 |
4 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 384f023..cf3a037 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1897,7 +1897,9 @@ void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator *gen, "make program", cmState::FILEPATH); // copy the enabled languages - this->LanguageEnabled = gen->LanguageEnabled; + this->GetCMakeInstance()->GetState()->SetEnabledLanguages( + gen->GetCMakeInstance()->GetState()->GetEnabledLanguages() + ); this->LanguagesReady = gen->LanguagesReady; this->ExtensionToLanguage = gen->ExtensionToLanguage; this->IgnoreExtensions = gen->IgnoreExtensions; diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index b51bd47..7107198 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -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; diff --git a/Source/cmState.cxx b/Source/cmState.cxx index d6899a4..24cbc4a 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -273,6 +273,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() { this->EnabledLanguages.clear(); diff --git a/Source/cmState.h b/Source/cmState.h index 9902db9..d10fae3 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -96,6 +96,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; |