summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx30
1 files changed, 12 insertions, 18 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 171d62a..ab044c1 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -200,7 +200,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
if (cnameString != pathString)
{
const char* cvars =
- this->GetCMakeInstance()->GetProperty(
+ this->GetCMakeInstance()->GetState()->GetGlobalProperty(
"__CMAKE_DELETE_CACHE_CHANGE_VARS_");
if(cvars)
{
@@ -210,7 +210,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
changeVars += langComp;
changeVars += ";";
changeVars += cname;
- this->GetCMakeInstance()->SetProperty(
+ this->GetCMakeInstance()->GetState()->SetGlobalProperty(
"__CMAKE_DELETE_CACHE_CHANGE_VARS_",
changeVars.c_str());
}
@@ -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()
@@ -1177,8 +1170,8 @@ void cmGlobalGenerator::AddCMP0042WarnTarget(const std::string& target)
bool cmGlobalGenerator::CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const
{
// If the property is not enabled then okay.
- if(!this->CMakeInstance
- ->GetPropertyAsBool("ALLOW_DUPLICATE_CUSTOM_TARGETS"))
+ if(!this->CMakeInstance->GetState()
+ ->GetGlobalPropertyAsBool("ALLOW_DUPLICATE_CUSTOM_TARGETS"))
{
return true;
}
@@ -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
@@ -2398,8 +2391,8 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
//----------------------------------------------------------------------------
const char* cmGlobalGenerator::GetPredefinedTargetsFolder()
{
- const char* prop =
- this->GetCMakeInstance()->GetProperty("PREDEFINED_TARGETS_FOLDER");
+ const char* prop = this->GetCMakeInstance()->GetState()
+ ->GetGlobalProperty("PREDEFINED_TARGETS_FOLDER");
if (prop)
{
@@ -2412,7 +2405,8 @@ const char* cmGlobalGenerator::GetPredefinedTargetsFolder()
//----------------------------------------------------------------------------
bool cmGlobalGenerator::UseFolderProperty()
{
- const char* prop = this->GetCMakeInstance()->GetProperty("USE_FOLDERS");
+ const char* prop = this->GetCMakeInstance()->GetState()
+ ->GetGlobalProperty("USE_FOLDERS");
// If this property is defined, let the setter turn this on or off...
//