cmGeneratorTarget: Issue messages through the local generator.

This commit is contained in:
Stephen Kelly 2015-10-08 23:28:46 +02:00
parent 27916f2cd1
commit 370bb92c10

View File

@ -402,7 +402,8 @@ std::string cmGeneratorTarget::GetOutputName(const std::string& config,
{ {
// An empty map entry indicates we have been called recursively // An empty map entry indicates we have been called recursively
// from the above block. // from the above block.
this->Makefile->GetCMakeInstance()->IssueMessage( this->LocalGenerator->GetCMakeInstance()
->IssueMessage(
cmake::FATAL_ERROR, cmake::FATAL_ERROR,
"Target '" + this->GetName() + "' OUTPUT_NAME depends on itself.", "Target '" + this->GetName() + "' OUTPUT_NAME depends on itself.",
this->Target->GetBacktrace()); this->Target->GetBacktrace());
@ -951,7 +952,7 @@ static bool processSources(cmGeneratorTarget const* tgt,
} }
if (!usedSources.empty()) if (!usedSources.empty())
{ {
mf->GetCMakeInstance()->IssueMessage(cmake::LOG, tgt->GetLocalGenerator()->GetCMakeInstance()->IssueMessage(cmake::LOG,
std::string("Used sources for target ") std::string("Used sources for target ")
+ tgt->GetName() + ":\n" + tgt->GetName() + ":\n"
+ usedSources, (*it)->ge->GetBacktrace()); + usedSources, (*it)->ge->GetBacktrace());
@ -1521,7 +1522,7 @@ public:
<< "\" but the target was not found. Perhaps a find_package() " << "\" but the target was not found. Perhaps a find_package() "
"call is missing for an IMPORTED target, or an ALIAS target is " "call is missing for an IMPORTED target, or an ALIAS target is "
"missing?"; "missing?";
this->Makefile->GetCMakeInstance()->IssueMessage( this->Target->GetLocalGenerator()->GetCMakeInstance()->IssueMessage(
messageType, e.str(), this->Target->Target->GetBacktrace()); messageType, e.str(), this->Target->Target->GetBacktrace());
} }
} }
@ -2444,7 +2445,7 @@ static void processIncludeDirectories(cmGeneratorTarget const* tgt,
} }
if (!usedIncludes.empty()) if (!usedIncludes.empty())
{ {
mf->GetCMakeInstance()->IssueMessage(cmake::LOG, tgt->GetLocalGenerator()->GetCMakeInstance()->IssueMessage(cmake::LOG,
std::string("Used includes for target ") std::string("Used includes for target ")
+ tgt->GetName() + ":\n" + tgt->GetName() + ":\n"
+ usedIncludes, (*it)->ge->GetBacktrace()); + usedIncludes, (*it)->ge->GetBacktrace());
@ -2577,7 +2578,7 @@ static void processCompileOptionsInternal(cmGeneratorTarget const* tgt,
} }
if (!usedOptions.empty()) if (!usedOptions.empty())
{ {
mf->GetCMakeInstance()->IssueMessage(cmake::LOG, tgt->GetLocalGenerator()->GetCMakeInstance()->IssueMessage(cmake::LOG,
std::string("Used compile ") + logName std::string("Used compile ") + logName
+ std::string(" for target ") + std::string(" for target ")
+ tgt->GetName() + ":\n" + tgt->GetName() + ":\n"
@ -4212,7 +4213,7 @@ cmGeneratorTarget::ReportPropertyOrigin(const std::string &p,
areport += result; areport += result;
areport += "\"):\n" + report; areport += "\"):\n" + report;
this->Makefile->GetCMakeInstance()->IssueMessage(cmake::LOG, areport); this->LocalGenerator->GetCMakeInstance()->IssueMessage(cmake::LOG, areport);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------