cmMakefile: Simplify CMP0054 handling.
This commit is contained in:
parent
e17b5e4262
commit
f9785e0cb6
|
@ -112,10 +112,7 @@ const char* cmConditionEvaluator::GetDefinitionIfUnquoted(
|
||||||
|
|
||||||
if(def && argument.WasQuoted() && this->Policy54Status == cmPolicies::WARN)
|
if(def && argument.WasQuoted() && this->Policy54Status == cmPolicies::WARN)
|
||||||
{
|
{
|
||||||
bool hasBeenReported = this->Makefile.HasCMP0054AlreadyBeenReported(
|
if(!this->Makefile.HasCMP0054AlreadyBeenReported())
|
||||||
this->Makefile.GetExecutionContext());
|
|
||||||
|
|
||||||
if(!hasBeenReported)
|
|
||||||
{
|
{
|
||||||
std::ostringstream e;
|
std::ostringstream e;
|
||||||
e << (cmPolicies::GetPolicyWarning(cmPolicies::CMP0054)) << "\n";
|
e << (cmPolicies::GetPolicyWarning(cmPolicies::CMP0054)) << "\n";
|
||||||
|
@ -161,10 +158,7 @@ bool cmConditionEvaluator::IsKeyword(std::string const& keyword,
|
||||||
if(isKeyword && argument.WasQuoted() &&
|
if(isKeyword && argument.WasQuoted() &&
|
||||||
this->Policy54Status == cmPolicies::WARN)
|
this->Policy54Status == cmPolicies::WARN)
|
||||||
{
|
{
|
||||||
bool hasBeenReported = this->Makefile.HasCMP0054AlreadyBeenReported(
|
if(!this->Makefile.HasCMP0054AlreadyBeenReported())
|
||||||
this->Makefile.GetExecutionContext());
|
|
||||||
|
|
||||||
if(!hasBeenReported)
|
|
||||||
{
|
{
|
||||||
std::ostringstream e;
|
std::ostringstream e;
|
||||||
e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0054) << "\n";
|
e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0054) << "\n";
|
||||||
|
|
|
@ -4941,10 +4941,9 @@ bool cmMakefile::SetPolicyVersion(const char *version)
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmMakefile::HasCMP0054AlreadyBeenReported(
|
bool cmMakefile::HasCMP0054AlreadyBeenReported() const
|
||||||
cmListFileContext context) const
|
|
||||||
{
|
{
|
||||||
cmCMP0054Id id(context);
|
cmCMP0054Id id(this->GetExecutionContext());
|
||||||
|
|
||||||
bool alreadyReported =
|
bool alreadyReported =
|
||||||
this->CMP0054ReportedIds.find(id) != this->CMP0054ReportedIds.end();
|
this->CMP0054ReportedIds.find(id) != this->CMP0054ReportedIds.end();
|
||||||
|
|
|
@ -411,8 +411,7 @@ public:
|
||||||
* Determine if the given context, name pair has already been reported
|
* Determine if the given context, name pair has already been reported
|
||||||
* in context of CMP0054.
|
* in context of CMP0054.
|
||||||
*/
|
*/
|
||||||
bool HasCMP0054AlreadyBeenReported(
|
bool HasCMP0054AlreadyBeenReported() const;
|
||||||
cmListFileContext context) const;
|
|
||||||
|
|
||||||
bool IgnoreErrorsCMP0061() const;
|
bool IgnoreErrorsCMP0061() const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue