summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-18 19:39:15 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-05-18 21:55:43 (GMT)
commitf9785e0cb6c823849bb344e487d9e70d9fdaddb4 (patch)
treed7ab3a0cab0148e11fdc45db05262724950b6dfe /Source
parente17b5e426294dc5cc86ba31dfd4d4acc553c0c72 (diff)
downloadCMake-f9785e0cb6c823849bb344e487d9e70d9fdaddb4.zip
CMake-f9785e0cb6c823849bb344e487d9e70d9fdaddb4.tar.gz
CMake-f9785e0cb6c823849bb344e487d9e70d9fdaddb4.tar.bz2
cmMakefile: Simplify CMP0054 handling.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmConditionEvaluator.cxx10
-rw-r--r--Source/cmMakefile.cxx5
-rw-r--r--Source/cmMakefile.h3
3 files changed, 5 insertions, 13 deletions
diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx
index e5a89b6..61847d4 100644
--- a/Source/cmConditionEvaluator.cxx
+++ b/Source/cmConditionEvaluator.cxx
@@ -112,10 +112,7 @@ const char* cmConditionEvaluator::GetDefinitionIfUnquoted(
if(def && argument.WasQuoted() && this->Policy54Status == cmPolicies::WARN)
{
- bool hasBeenReported = this->Makefile.HasCMP0054AlreadyBeenReported(
- this->Makefile.GetExecutionContext());
-
- if(!hasBeenReported)
+ if(!this->Makefile.HasCMP0054AlreadyBeenReported())
{
std::ostringstream e;
e << (cmPolicies::GetPolicyWarning(cmPolicies::CMP0054)) << "\n";
@@ -161,10 +158,7 @@ bool cmConditionEvaluator::IsKeyword(std::string const& keyword,
if(isKeyword && argument.WasQuoted() &&
this->Policy54Status == cmPolicies::WARN)
{
- bool hasBeenReported = this->Makefile.HasCMP0054AlreadyBeenReported(
- this->Makefile.GetExecutionContext());
-
- if(!hasBeenReported)
+ if(!this->Makefile.HasCMP0054AlreadyBeenReported())
{
std::ostringstream e;
e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0054) << "\n";
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 4de3bcd..33b7a0b 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4941,10 +4941,9 @@ bool cmMakefile::SetPolicyVersion(const char *version)
}
//----------------------------------------------------------------------------
-bool cmMakefile::HasCMP0054AlreadyBeenReported(
- cmListFileContext context) const
+bool cmMakefile::HasCMP0054AlreadyBeenReported() const
{
- cmCMP0054Id id(context);
+ cmCMP0054Id id(this->GetExecutionContext());
bool alreadyReported =
this->CMP0054ReportedIds.find(id) != this->CMP0054ReportedIds.end();
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 5ef2ec9..3203b1b 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -411,8 +411,7 @@ public:
* Determine if the given context, name pair has already been reported
* in context of CMP0054.
*/
- bool HasCMP0054AlreadyBeenReported(
- cmListFileContext context) const;
+ bool HasCMP0054AlreadyBeenReported() const;
bool IgnoreErrorsCMP0061() const;