cmLocalGenerator: Simplify IssueMessage implementation

This method was added by commit v3.4.0-rc1~424^2~6 (cmLocalGenerator:
Add IssueMessage method, 2015-06-13) in order to reduce callers'
dependency on cmMakefile.  Currently the implementation of
cmLocalGenerator::IssueMessage is just a copy of the post-configure code
path in cmMakefile::IssueMessage.  De-duplicate the implementation by
simply calling the cmMakefile copy for now.  This will simplify upcoming
refactoring of backtraces.  The dependency on cmMakefile can be removed
by future work once that is done.
This commit is contained in:
Brad King 2016-04-15 10:08:37 -04:00
parent cc7aed77a8
commit da07c506b9
1 changed files with 1 additions and 11 deletions

View File

@ -69,17 +69,7 @@ cmLocalGenerator::~cmLocalGenerator()
void cmLocalGenerator::IssueMessage(cmake::MessageType t,
std::string const& text) const
{
cmListFileContext lfc;
lfc.FilePath = this->StateSnapshot.GetDirectory().GetCurrentSource();
lfc.FilePath += "/CMakeLists.txt";
if(!this->GlobalGenerator->GetCMakeInstance()->GetIsInTryCompile())
{
cmOutputConverter converter(this->StateSnapshot);
lfc.FilePath = converter.Convert(lfc.FilePath, cmLocalGenerator::HOME);
}
lfc.Line = 0;
this->GlobalGenerator->GetCMakeInstance()->IssueMessage(t, text, lfc);
this->Makefile->IssueMessage(t, text);
}
//----------------------------------------------------------------------------