summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-03 08:12:10 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-05-04 20:32:20 (GMT)
commitde211686122166e7485a98fd027bd1d32fda40b0 (patch)
tree89024f8c8cc52cf751520faa7ac8e97eb301c2ef /Source/cmTarget.cxx
parent13981f20688279b4e10faca67b7020946c9ef733 (diff)
downloadCMake-de211686122166e7485a98fd027bd1d32fda40b0.zip
CMake-de211686122166e7485a98fd027bd1d32fda40b0.tar.gz
CMake-de211686122166e7485a98fd027bd1d32fda40b0.tar.bz2
Port to static cmPolicies API.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx38
1 files changed, 12 insertions, 26 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index f69e9ae..8d1367e 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -974,8 +974,7 @@ std::string cmTarget::ProcessSourceItemCMP0049(const std::string& s)
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0049))
{
case cmPolicies::WARN:
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0049)) << "\n";
+ e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0049) << "\n";
break;
case cmPolicies::OLD:
noMessage = true;
@@ -2008,8 +2007,7 @@ static void processIncludeDirectories(cmTarget const* tgt,
switch(tgt->GetPolicyStatusCMP0027())
{
case cmPolicies::WARN:
- e << (mf->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0027)) << "\n";
+ e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0027) << "\n";
case cmPolicies::OLD:
messageType = cmake::AUTHOR_WARNING;
break;
@@ -2049,8 +2047,7 @@ static void processIncludeDirectories(cmTarget const* tgt,
{
case cmPolicies::WARN:
{
- e << (mf->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0021)) << "\n";
+ e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0021) << "\n";
messageType = cmake::AUTHOR_WARNING;
}
break;
@@ -2398,8 +2395,7 @@ void cmTarget::GetCompileDefinitions(std::vector<std::string> &list,
case cmPolicies::WARN:
{
std::ostringstream e;
- e << this->Makefile->GetCMakeInstance()->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0043);
+ e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0043);
this->Makefile->IssueMessage(cmake::AUTHOR_WARNING,
e.str());
}
@@ -2874,8 +2870,7 @@ bool cmTarget::HandleLocationPropertyPolicy(cmMakefile* context) const
switch (context->GetPolicyStatus(cmPolicies::CMP0026))
{
case cmPolicies::WARN:
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0026)) << "\n";
+ e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0026) << "\n";
modal = "should";
case cmPolicies::OLD:
break;
@@ -3138,8 +3133,7 @@ const char *cmTarget::GetProperty(const std::string& prop,
switch(context->GetPolicyStatus(cmPolicies::CMP0051))
{
case cmPolicies::WARN:
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0051)) << "\n";
+ e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0051) << "\n";
noMessage = false;
case cmPolicies::OLD:
break;
@@ -3236,8 +3230,7 @@ public:
{
case cmPolicies::WARN:
{
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0028)) << "\n";
+ e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0028) << "\n";
messageType = cmake::AUTHOR_WARNING;
}
break;
@@ -5993,9 +5986,7 @@ cmTargetInternals::ComputeLinkInterfaceLibraries(
&& strcmp(newExplicitLibraries, explicitLibraries) != 0)
{
std::ostringstream w;
- w <<
- (thisTarget->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0022)) << "\n"
+ w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0022) << "\n"
"Target \"" << thisTarget->GetName() << "\" has an "
"INTERFACE_LINK_LIBRARIES property which differs from its " <<
linkIfaceProp << " properties."
@@ -6064,9 +6055,7 @@ cmTargetInternals::ComputeLinkInterfaceLibraries(
{ newLibraries = "(empty)"; }
std::ostringstream w;
- w <<
- (thisTarget->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0022)) << "\n"
+ w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0022) << "\n"
"Target \"" << thisTarget->GetName() << "\" has an "
"INTERFACE_LINK_LIBRARIES property. "
"This should be preferred as the source of the link interface "
@@ -6323,8 +6312,7 @@ cmTargetInternals::ComputeLinkImplementationLibraries(
{
case cmPolicies::WARN:
{
- e << (thisTarget->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0038)) << "\n";
+ e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0038) << "\n";
messageType = cmake::AUTHOR_WARNING;
}
break;
@@ -6461,8 +6449,7 @@ std::string cmTarget::CheckCMP0004(std::string const& item) const
case cmPolicies::WARN:
{
std::ostringstream w;
- w << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0004)) << "\n"
+ w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0004) << "\n"
<< "Target \"" << this->GetName() << "\" links to item \""
<< item << "\" which has leading or trailing whitespace.";
cm->IssueMessage(cmake::AUTHOR_WARNING, w.str(),
@@ -6483,8 +6470,7 @@ std::string cmTarget::CheckCMP0004(std::string const& item) const
case cmPolicies::REQUIRED_ALWAYS:
{
std::ostringstream e;
- e << (this->Makefile->GetPolicies()
- ->GetRequiredPolicyError(cmPolicies::CMP0004)) << "\n"
+ e << cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0004) << "\n"
<< "Target \"" << this->GetName() << "\" links to item \""
<< item << "\" which has leading or trailing whitespace.";
cm->IssueMessage(cmake::FATAL_ERROR, e.str(), this->GetBacktrace());