summaryrefslogtreecommitdiffstats
path: root/Source/cmIncludeCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-04-01 15:06:17 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-04-01 15:06:17 (GMT)
commitf70b2253f65fd01223859c7391cabd25fce184bf (patch)
tree4c3cdf1b623ee673e19b93503d30edb1bd59c03f /Source/cmIncludeCommand.cxx
parent242e13bfe622d80ca329119ae4027d739d7fa90f (diff)
parent77b581c2f004a36b2b62cc7c678abf51f92c76b5 (diff)
downloadCMake-f70b2253f65fd01223859c7391cabd25fce184bf.zip
CMake-f70b2253f65fd01223859c7391cabd25fce184bf.tar.gz
CMake-f70b2253f65fd01223859c7391cabd25fce184bf.tar.bz2
Merge topic 'fix_policy_diagnostics'
77b581c2 Policies: omit warnings about unset policies when they are actually set to NEW
Diffstat (limited to 'Source/cmIncludeCommand.cxx')
-rw-r--r--Source/cmIncludeCommand.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx
index 4d9935c..0a4f5c9 100644
--- a/Source/cmIncludeCommand.cxx
+++ b/Source/cmIncludeCommand.cxx
@@ -98,11 +98,14 @@ bool cmIncludeCommand
if (gg->IsExportedTargetsFile(fname_abs))
{
const char *modal = 0;
+ cmOStringStream e;
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0024))
{
case cmPolicies::WARN:
+ e << (this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0024)) << "\n";
modal = "should";
case cmPolicies::OLD:
break;
@@ -114,9 +117,6 @@ bool cmIncludeCommand
}
if (modal)
{
- cmOStringStream e;
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0024)) << "\n";
e << "The file\n " << fname_abs << "\nwas generated by the export() "
"command. It " << modal << " not be used as the argument to the "
"include() command. Use ALIAS targets instead to refer to targets "