summaryrefslogtreecommitdiffstats
path: root/Source/cmAddExecutableCommand.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/cmAddExecutableCommand.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/cmAddExecutableCommand.cxx')
-rw-r--r--Source/cmAddExecutableCommand.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx
index 62b6667..3f9400e 100644
--- a/Source/cmAddExecutableCommand.cxx
+++ b/Source/cmAddExecutableCommand.cxx
@@ -79,10 +79,13 @@ bool cmAddExecutableCommand
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;
@@ -94,9 +97,6 @@ bool cmAddExecutableCommand
}
if (issueMessage)
{
- cmOStringStream e;
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0037)) << "\n";
e << "The target name \"" << exename <<
"\" is reserved or not valid for certain "
"CMake features, such as generator expressions, and may result "