summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-04-02 13:38:28 (GMT)
committerBrad King <brad.king@kitware.com>2014-04-02 13:38:28 (GMT)
commitf180fc89255bdd72e5d1b49ba7e7cc8dcb77c72e (patch)
treedde34bd6a0507504400c4a80ba2dc519c9ca96dc /Source/cmMakefile.cxx
parentb783b99f8a4bafd3e53bcdfc045b3fc2cd225875 (diff)
parent77b581c2f004a36b2b62cc7c678abf51f92c76b5 (diff)
downloadCMake-f180fc89255bdd72e5d1b49ba7e7cc8dcb77c72e.zip
CMake-f180fc89255bdd72e5d1b49ba7e7cc8dcb77c72e.tar.gz
CMake-f180fc89255bdd72e5d1b49ba7e7cc8dcb77c72e.tar.bz2
Merge branch 'fix_policy_diagnostics' into release
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 10137ec..11559d9 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -893,9 +893,12 @@ cmMakefile::AddCustomCommandToTarget(const char* target,
{
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
bool issueMessage = false;
+ cmOStringStream e;
switch(this->GetPolicyStatus(cmPolicies::CMP0040))
{
case cmPolicies::WARN:
+ e << (this->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0040)) << "\n";
issueMessage = true;
case cmPolicies::OLD:
break;
@@ -908,9 +911,6 @@ cmMakefile::AddCustomCommandToTarget(const char* target,
if(issueMessage)
{
- cmOStringStream e;
- e << (this->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0040)) << "\n";
e << "The target name \"" << target << "\" is unknown in this context.";
IssueMessage(messageType, e.str().c_str());
}