cmake: Remove the happy global property scope pattern.
Global properties are already global in scope, so remove the overload for specifying it and port users of the API. The call from cmMakefile::GetProperty can be simplified because the scope is only used during chaining, and there is no further chaining after processing global properties.
This commit is contained in:
parent
24b7f31d3a
commit
0076b5d834
|
@ -1132,7 +1132,7 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
|||
cmCTestScriptHandler* ch =
|
||||
static_cast<cmCTestScriptHandler*>(this->CTest->GetHandler("script"));
|
||||
cmake* cm = ch->GetCMake();
|
||||
const char* subproject = cm->GetProperty("SubProject", cmProperty::GLOBAL);
|
||||
const char* subproject = cm->GetProperty("SubProject");
|
||||
// TODO: Encode values for a URL instead of trusting caller.
|
||||
std::ostringstream str;
|
||||
str << "project="
|
||||
|
|
|
@ -1558,12 +1558,12 @@ void cmCTest::AddSiteProperties(std::ostream& ostr)
|
|||
return;
|
||||
}
|
||||
// This code should go when cdash is changed to use labels only
|
||||
const char* subproject = cm->GetProperty("SubProject", cmProperty::GLOBAL);
|
||||
const char* subproject = cm->GetProperty("SubProject");
|
||||
if(subproject)
|
||||
{
|
||||
ostr << "<Subproject name=\"" << subproject << "\">\n";
|
||||
const char* labels =
|
||||
ch->GetCMake()->GetProperty("SubProjectLabels", cmProperty::GLOBAL);
|
||||
ch->GetCMake()->GetProperty("SubProjectLabels");
|
||||
if(labels)
|
||||
{
|
||||
ostr << " <Labels>\n";
|
||||
|
@ -1581,7 +1581,7 @@ void cmCTest::AddSiteProperties(std::ostream& ostr)
|
|||
}
|
||||
|
||||
// This code should stay when cdash only does label based sub-projects
|
||||
const char* label = cm->GetProperty("Label", cmProperty::GLOBAL);
|
||||
const char* label = cm->GetProperty("Label");
|
||||
if(label)
|
||||
{
|
||||
ostr << "<Labels>\n";
|
||||
|
|
|
@ -470,7 +470,7 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
|
|||
}
|
||||
|
||||
if (const char *extraNaturesProp = mf->GetCMakeInstance()->
|
||||
GetProperty("ECLIPSE_EXTRA_NATURES", cmProperty::GLOBAL))
|
||||
GetProperty("ECLIPSE_EXTRA_NATURES"))
|
||||
{
|
||||
std::vector<std::string> extraNatures;
|
||||
cmSystemTools::ExpandListArgument(extraNaturesProp, extraNatures);
|
||||
|
|
|
@ -234,8 +234,7 @@ void cmLocalNinjaGenerator::WritePools(std::ostream& os)
|
|||
{
|
||||
cmGlobalNinjaGenerator::WriteDivider(os);
|
||||
|
||||
const char* jobpools = this->GetCMakeInstance()
|
||||
->GetProperty("JOB_POOLS", cmProperty::GLOBAL);
|
||||
const char* jobpools = this->GetCMakeInstance()->GetProperty("JOB_POOLS");
|
||||
if (jobpools)
|
||||
{
|
||||
cmGlobalNinjaGenerator::WriteComment(os,
|
||||
|
|
|
@ -4239,7 +4239,7 @@ const char *cmMakefile::GetProperty(const std::string& prop,
|
|||
return this->LocalGenerator->GetParent()->GetMakefile()->
|
||||
GetProperty(prop, scope);
|
||||
}
|
||||
return this->GetCMakeInstance()->GetProperty(prop,scope);
|
||||
return this->GetCMakeInstance()->GetProperty(prop);
|
||||
}
|
||||
|
||||
return retVal;
|
||||
|
|
|
@ -1514,7 +1514,7 @@ int cmake::ActualConfigure()
|
|||
|
||||
cmMakefile* mf=this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile();
|
||||
if (mf->IsOn("CTEST_USE_LAUNCHERS")
|
||||
&& !this->GetProperty("RULE_LAUNCH_COMPILE", cmProperty::GLOBAL))
|
||||
&& !this->GetProperty("RULE_LAUNCH_COMPILE"))
|
||||
{
|
||||
cmSystemTools::Error("CTEST_USE_LAUNCHERS is enabled, but the "
|
||||
"RULE_LAUNCH_COMPILE global property is not defined.\n"
|
||||
|
@ -2197,12 +2197,6 @@ void cmake::AppendProperty(const std::string& prop,
|
|||
}
|
||||
|
||||
const char *cmake::GetProperty(const std::string& prop)
|
||||
{
|
||||
return this->GetProperty(prop, cmProperty::GLOBAL);
|
||||
}
|
||||
|
||||
const char *cmake::GetProperty(const std::string& prop,
|
||||
cmProperty::ScopeType scope)
|
||||
{
|
||||
// watch for special properties
|
||||
std::string output = "";
|
||||
|
@ -2238,7 +2232,7 @@ const char *cmake::GetProperty(const std::string& prop,
|
|||
}
|
||||
#undef STRING_LIST_ELEMENT
|
||||
bool dummy = false;
|
||||
return this->Properties.GetPropertyValue(prop, scope, dummy);
|
||||
return this->Properties.GetPropertyValue(prop, cmProperty::GLOBAL, dummy);
|
||||
}
|
||||
|
||||
bool cmake::GetPropertyAsBool(const std::string& prop)
|
||||
|
|
|
@ -253,8 +253,6 @@ class cmake
|
|||
void AppendProperty(const std::string& prop,
|
||||
const char *value,bool asString=false);
|
||||
const char *GetProperty(const std::string& prop);
|
||||
const char *GetProperty(const std::string& prop,
|
||||
cmProperty::ScopeType scope);
|
||||
bool GetPropertyAsBool(const std::string& prop);
|
||||
|
||||
///! Get or create an cmInstalledFile instance and return a pointer to it
|
||||
|
|
Loading…
Reference in New Issue