summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2014-03-28 20:38:10 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-31 13:45:10 (GMT)
commit77b581c2f004a36b2b62cc7c678abf51f92c76b5 (patch)
tree38d8a72a1d631f6a9b5cd30ab9ab14a256e7826a /Source/cmMakefile.cxx
parenta48de7d8506325e7f27c9dada578744e1ff3fb35 (diff)
downloadCMake-77b581c2f004a36b2b62cc7c678abf51f92c76b5.zip
CMake-77b581c2f004a36b2b62cc7c678abf51f92c76b5.tar.gz
CMake-77b581c2f004a36b2b62cc7c678abf51f92c76b5.tar.bz2
Policies: omit warnings about unset policies when they are actually set to NEW
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());
}