summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index ba1938f..759a7d6 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2707,6 +2707,7 @@ cmGlobalGenerator::SplitFrameworkPath(const std::string& path,
}
static bool RaiseCMP0037Message(cmake* cm, cmTarget* tgt,
+ std::string const& targetNameAsWritten,
std::string const& reason)
{
MessageType messageType = MessageType::AUTHOR_WARNING;
@@ -2727,8 +2728,8 @@ static bool RaiseCMP0037Message(cmake* cm, cmTarget* tgt,
break;
}
if (issueMessage) {
- e << "The target name \"" << tgt->GetName() << "\" is reserved " << reason
- << ".";
+ e << "The target name \"" << targetNameAsWritten << "\" is reserved "
+ << reason << ".";
if (messageType == MessageType::AUTHOR_WARNING) {
e << " It may result in undefined behavior.";
}
@@ -2747,7 +2748,8 @@ bool cmGlobalGenerator::CheckCMP0037(std::string const& targetName,
if (!tgt) {
return true;
}
- return RaiseCMP0037Message(this->GetCMakeInstance(), tgt, reason);
+ return RaiseCMP0037Message(this->GetCMakeInstance(), tgt, targetName,
+ reason);
}
void cmGlobalGenerator::CreateDefaultGlobalTargets(