diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-03 08:12:10 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-04 20:32:20 (GMT) |
commit | de211686122166e7485a98fd027bd1d32fda40b0 (patch) | |
tree | 89024f8c8cc52cf751520faa7ac8e97eb301c2ef /Source/cmConditionEvaluator.cxx | |
parent | 13981f20688279b4e10faca67b7020946c9ef733 (diff) | |
download | CMake-de211686122166e7485a98fd027bd1d32fda40b0.zip CMake-de211686122166e7485a98fd027bd1d32fda40b0.tar.gz CMake-de211686122166e7485a98fd027bd1d32fda40b0.tar.bz2 |
Port to static cmPolicies API.
Diffstat (limited to 'Source/cmConditionEvaluator.cxx')
-rw-r--r-- | Source/cmConditionEvaluator.cxx | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 1f9b9d4..73aface 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -118,8 +118,7 @@ const char* cmConditionEvaluator::GetDefinitionIfUnquoted( if(!hasBeenReported) { std::ostringstream e; - e << (this->Makefile.GetPolicies()->GetPolicyWarning( - cmPolicies::CMP0054)) << "\n"; + e << (cmPolicies::GetPolicyWarning(cmPolicies::CMP0054)) << "\n"; e << "Quoted variables like \"" << argument.GetValue() << "\" will no longer be dereferenced " "when the policy is set to NEW. " @@ -168,8 +167,7 @@ bool cmConditionEvaluator::IsKeyword(std::string const& keyword, if(!hasBeenReported) { std::ostringstream e; - e << (this->Makefile.GetPolicies()->GetPolicyWarning( - cmPolicies::CMP0054)) << "\n"; + e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0054) << "\n"; e << "Quoted keywords like \"" << argument.GetValue() << "\" will no longer be interpreted as keywords " "when the policy is set to NEW. " @@ -280,10 +278,9 @@ bool cmConditionEvaluator::GetBooleanValueWithAutoDereference( { case cmPolicies::WARN: { - cmPolicies* policies = this->Makefile.GetPolicies(); errorString = "An argument named \"" + newArg.GetValue() + "\" appears in a conditional statement. " - + policies->GetPolicyWarning(cmPolicies::CMP0012); + + cmPolicies::GetPolicyWarning(cmPolicies::CMP0012); status = cmake::AUTHOR_WARNING; } case cmPolicies::OLD: @@ -291,10 +288,9 @@ bool cmConditionEvaluator::GetBooleanValueWithAutoDereference( case cmPolicies::REQUIRED_IF_USED: case cmPolicies::REQUIRED_ALWAYS: { - cmPolicies* policies = this->Makefile.GetPolicies(); errorString = "An argument named \"" + newArg.GetValue() + "\" appears in a conditional statement. " - + policies->GetRequiredPolicyError(cmPolicies::CMP0012); + + cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0012); status = cmake::FATAL_ERROR; } case cmPolicies::NEW: @@ -493,8 +489,7 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList &newArgs, { cmPolicies::PolicyID pid; this->HandlePredicate( - this->Makefile.GetPolicies()->GetPolicyID( - argP1->c_str(), pid), + cmPolicies::GetPolicyID(argP1->c_str(), pid), reducible, arg, newArgs, argP1, argP2); } // does a target exist @@ -702,8 +697,7 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList &newArgs, else if(this->Policy57Status == cmPolicies::WARN) { std::ostringstream e; - e << (this->Makefile.GetPolicies()->GetPolicyWarning( - cmPolicies::CMP0057)) << "\n"; + e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0057) << "\n"; e << "IN_LIST will be interpreted as an operator " "when the policy is set to NEW. " "Since the policy is not set the OLD behavior will be used."; |