summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-05-05 13:35:30 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-05-05 13:35:30 (GMT)
commit2c5a1bff237f240faf9a45860b0007a44e2d6205 (patch)
tree90c3d74cca1238a867712e4c9e8329c89412f678 /Source/cmTarget.cxx
parentb492a17611b4df84cbba4b71bed95da5a2e0ca13 (diff)
parent013ada80eac9cb119a6288ee58724a8c9915a35c (diff)
downloadCMake-2c5a1bff237f240faf9a45860b0007a44e2d6205.zip
CMake-2c5a1bff237f240faf9a45860b0007a44e2d6205.tar.gz
CMake-2c5a1bff237f240faf9a45860b0007a44e2d6205.tar.bz2
Merge topic 'refactor-cmPolicies'
013ada80 cmPolicies: Implement PolicyMap in terms of bitset. be6664c2 cmPolicies: Implement abstraction for PolicyMap. de211686 Port to static cmPolicies API. 13981f20 cmPolicies: Make all API static. 23e2bcc8 cmPolicies: Remove unused DefinePolicy method. 5641ba4f cmPolicies: Remove unused cmPolicy class. 3de54497 cmPolicies: Loop over all policies using enum constants. 387aff20 cmPolicies: Trivialize GetPolicyStatus method. dbf680d6 cmPolicies: Use more-direct ID access. 8c204133 cmPolicies: Implement in terms of public API. e3a8c029 cmPolicies: Make private method file-static. cb765af0 cmPolicies: Implement short description access with XMacros. 5df267fa cmPolicies: Implement version check with XMacro. 2235cfeb cmPolicies: Implement id to version with XMacro. 05d84388 cmPolicies: Implement id to string conversion with XMacro. 6eaade8a cmPolicies: Introduce XMacro table for policy data. ...
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 ff1fa8a..8a8c163 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -973,8 +973,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;
@@ -2007,8 +2006,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;
@@ -2048,8 +2046,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;
@@ -2397,8 +2394,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());
}
@@ -2873,8 +2869,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;
@@ -3137,8 +3132,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;
@@ -3235,8 +3229,7 @@ public:
{
case cmPolicies::WARN:
{
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0028)) << "\n";
+ e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0028) << "\n";
messageType = cmake::AUTHOR_WARNING;
}
break;
@@ -5991,9 +5984,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."
@@ -6062,9 +6053,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 "
@@ -6321,8 +6310,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;
@@ -6459,8 +6447,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(),
@@ -6481,8 +6468,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());