summaryrefslogtreecommitdiffstats
path: root/Source/cmIncludeCommand.cxx
diff options
context:
space:
mode:
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 "