diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-04-11 12:16:39 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-04-13 18:19:58 (GMT) |
commit | 74de9a734c92288fb3e602be0d1c967b33b67443 (patch) | |
tree | 76c1c7478d0741e8574a5065b3afd912b111c150 /Source/cmGlobalGenerator.cxx | |
parent | b159bff732d4e34a683edd1740604428049d1819 (diff) | |
download | CMake-74de9a734c92288fb3e602be0d1c967b33b67443.zip CMake-74de9a734c92288fb3e602be0d1c967b33b67443.tar.gz CMake-74de9a734c92288fb3e602be0d1c967b33b67443.tar.bz2 |
cmGlobalGenerator: Delegate storage of enabled languages to cmState.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 171d62a..56a0a45 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -969,13 +969,7 @@ void cmGlobalGenerator::SetLanguageEnabled(const std::string& l, void cmGlobalGenerator::SetLanguageEnabledFlag(const std::string& l, cmMakefile* mf) { - std::vector<std::string>::iterator it = - std::lower_bound(this->LanguageEnabled.begin(), - this->LanguageEnabled.end(), l); - if (it == this->LanguageEnabled.end() || *it != l) - { - this->LanguageEnabled.insert(it, l); - } + this->CMakeInstance->GetState()->SetLanguageEnabled(l); // Fill the language-to-extension map with the current variable // settings to make sure it is available for the try_compile() @@ -1086,13 +1080,12 @@ bool cmGlobalGenerator::IgnoreFile(const char* ext) const bool cmGlobalGenerator::GetLanguageEnabled(const std::string& l) const { - return std::binary_search(this->LanguageEnabled.begin(), - this->LanguageEnabled.end(), l); + return this->CMakeInstance->GetState()->GetLanguageEnabled(l); } void cmGlobalGenerator::ClearEnabledLanguages() { - this->LanguageEnabled.clear(); + return this->CMakeInstance->GetState()->ClearEnabledLanguages(); } void cmGlobalGenerator::Configure() @@ -1966,7 +1959,7 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, void cmGlobalGenerator::GetEnabledLanguages(std::vector<std::string>& lang) const { - lang = this->LanguageEnabled; + lang = this->CMakeInstance->GetState()->GetEnabledLanguages(); } int cmGlobalGenerator::GetLinkerPreference(const std::string& lang) const |