summaryrefslogtreecommitdiff
path: root/Source/cmAddCustomTargetCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-04-01 11:06:17 -0400
committerCMake Topic Stage <kwrobot@kitware.com>2014-04-01 11:06:17 -0400
commitf70b2253f65fd01223859c7391cabd25fce184bf (patch)
tree4c3cdf1b623ee673e19b93503d30edb1bd59c03f /Source/cmAddCustomTargetCommand.cxx
parent242e13bfe622d80ca329119ae4027d739d7fa90f (diff)
parent77b581c2f004a36b2b62cc7c678abf51f92c76b5 (diff)
downloadcmake-f70b2253f65fd01223859c7391cabd25fce184bf.tar.gz
Merge topic 'fix_policy_diagnostics'
77b581c2 Policies: omit warnings about unset policies when they are actually set to NEW
Diffstat (limited to 'Source/cmAddCustomTargetCommand.cxx')
-rw-r--r--Source/cmAddCustomTargetCommand.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx
index da02f008eb..2fb0eb369c 100644
--- a/Source/cmAddCustomTargetCommand.cxx
+++ b/Source/cmAddCustomTargetCommand.cxx
@@ -165,10 +165,13 @@ bool cmAddCustomTargetCommand
if (!nameOk)
{
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
+ cmOStringStream e;
bool issueMessage = false;
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0037))
{
case cmPolicies::WARN:
+ e << (this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0037)) << "\n";
issueMessage = true;
case cmPolicies::OLD:
break;
@@ -180,9 +183,6 @@ bool cmAddCustomTargetCommand
}
if (issueMessage)
{
- cmOStringStream e;
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0037)) << "\n";
e << "The target name \"" << targetName <<
"\" is reserved or not valid for certain "
"CMake features, such as generator expressions, and may result "