summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-11 12:16:39 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-04-13 18:19:58 (GMT)
commit74de9a734c92288fb3e602be0d1c967b33b67443 (patch)
tree76c1c7478d0741e8574a5065b3afd912b111c150 /Source/cmState.cxx
parentb159bff732d4e34a683edd1740604428049d1819 (diff)
downloadCMake-74de9a734c92288fb3e602be0d1c967b33b67443.zip
CMake-74de9a734c92288fb3e602be0d1c967b33b67443.tar.gz
CMake-74de9a734c92288fb3e602be0d1c967b33b67443.tar.bz2
cmGlobalGenerator: Delegate storage of enabled languages to cmState.
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r--Source/cmState.cxx27
1 files changed, 27 insertions, 0 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 3e88ecc..c43262f 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -236,3 +236,30 @@ bool cmState::IsPropertyChained(const std::string& name,
{
return this->PropertyDefinitions[scope].IsPropertyChained(name);
}
+
+void cmState::SetLanguageEnabled(std::string const& l)
+{
+ std::vector<std::string>::iterator it =
+ std::lower_bound(this->EnabledLanguages.begin(),
+ this->EnabledLanguages.end(), l);
+ if (it == this->EnabledLanguages.end() || *it != l)
+ {
+ this->EnabledLanguages.insert(it, l);
+ }
+}
+
+bool cmState::GetLanguageEnabled(std::string const& l) const
+{
+ return std::binary_search(this->EnabledLanguages.begin(),
+ this->EnabledLanguages.end(), l);
+}
+
+std::vector<std::string> cmState::GetEnabledLanguages() const
+{
+ return this->EnabledLanguages;
+}
+
+void cmState::ClearEnabledLanguages()
+{
+ this->EnabledLanguages.clear();
+}