cmake: remove dummy backtraces for IssueMessage

This commit is contained in:
Ben Boeckel 2014-05-23 14:54:42 -04:00
parent d46c650d67
commit efc205695d
5 changed files with 14 additions and 17 deletions

View File

@ -386,15 +386,17 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
e << "The dependency target \"" << dependee_name e << "The dependency target \"" << dependee_name
<< "\" of target \"" << depender->GetName() << "\" does not exist."; << "\" of target \"" << depender->GetName() << "\" does not exist.";
cmListFileBacktrace nullBacktrace;
cmListFileBacktrace const* backtrace = cmListFileBacktrace const* backtrace =
depender->GetUtilityBacktrace(dependee_name); depender->GetUtilityBacktrace(dependee_name);
if(!backtrace) if(backtrace)
{ {
backtrace = &nullBacktrace; cm->IssueMessage(messageType, e.str(), *backtrace);
}
else
{
cm->IssueMessage(messageType, e.str());
} }
cm->IssueMessage(messageType, e.str(), *backtrace);
} }
} }

View File

@ -1282,8 +1282,7 @@ void cmGlobalGenerator::Generate()
if(!this->GenerateCPackPropertiesFile()) if(!this->GenerateCPackPropertiesFile())
{ {
this->GetCMakeInstance()->IssueMessage( this->GetCMakeInstance()->IssueMessage(
cmake::FATAL_ERROR, "Could not write CPack properties file.", cmake::FATAL_ERROR, "Could not write CPack properties file.");
cmListFileBacktrace());
} }
for (std::map<std::string, cmExportBuildFileGenerator*>::iterator for (std::map<std::string, cmExportBuildFileGenerator*>::iterator
@ -1294,8 +1293,7 @@ void cmGlobalGenerator::Generate()
&& !cmSystemTools::GetErrorOccuredFlag()) && !cmSystemTools::GetErrorOccuredFlag())
{ {
this->GetCMakeInstance() this->GetCMakeInstance()
->IssueMessage(cmake::FATAL_ERROR, "Could not write export file.", ->IssueMessage(cmake::FATAL_ERROR, "Could not write export file.");
cmListFileBacktrace());
return; return;
} }
} }
@ -1324,8 +1322,7 @@ void cmGlobalGenerator::Generate()
{ {
w << " " << *iter << "\n"; w << " " << *iter << "\n";
} }
this->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING, w.str(), this->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING, w.str());
cmListFileBacktrace());
} }
this->CMakeInstance->UpdateProgress("Generating done", -1); this->CMakeInstance->UpdateProgress("Generating done", -1);
@ -1525,8 +1522,7 @@ cmGlobalGenerator::GetGeneratorTarget(cmTarget const* t) const
if(ti == this->GeneratorTargets.end()) if(ti == this->GeneratorTargets.end())
{ {
this->CMakeInstance->IssueMessage( this->CMakeInstance->IssueMessage(
cmake::INTERNAL_ERROR, "Missing cmGeneratorTarget instance!", cmake::INTERNAL_ERROR, "Missing cmGeneratorTarget instance!");
cmListFileBacktrace());
return 0; return 0;
} }
return ti->second; return ti->second;

View File

@ -5167,8 +5167,7 @@ cmTarget::ReportPropertyOrigin(const std::string &p,
areport += result; areport += result;
areport += "\"):\n" + report; areport += "\"):\n" + report;
cmListFileBacktrace lfbt; this->Makefile->GetCMakeInstance()->IssueMessage(cmake::LOG, areport);
this->Makefile->GetCMakeInstance()->IssueMessage(cmake::LOG, areport, lfbt);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------

View File

@ -2786,7 +2786,7 @@ void cmake::RunCheckForUnusedVariables()
} }
if(haveUnused) if(haveUnused)
{ {
this->IssueMessage(cmake::WARNING, msg.str(), cmListFileBacktrace()); this->IssueMessage(cmake::WARNING, msg.str());
} }
#endif #endif
} }

View File

@ -13,6 +13,7 @@
#ifndef cmake_h #ifndef cmake_h
#define cmake_h #define cmake_h
#include "cmListFileCache.h"
#include "cmSystemTools.h" #include "cmSystemTools.h"
#include "cmPropertyDefinitionMap.h" #include "cmPropertyDefinitionMap.h"
#include "cmPropertyMap.h" #include "cmPropertyMap.h"
@ -29,7 +30,6 @@ class cmFileTimeComparison;
class cmExternalMakefileProjectGenerator; class cmExternalMakefileProjectGenerator;
class cmDocumentationSection; class cmDocumentationSection;
class cmPolicies; class cmPolicies;
class cmListFileBacktrace;
class cmTarget; class cmTarget;
class cmGeneratedFileStream; class cmGeneratedFileStream;
@ -360,7 +360,7 @@ class cmake
/** Display a message to the user. */ /** Display a message to the user. */
void IssueMessage(cmake::MessageType t, std::string const& text, void IssueMessage(cmake::MessageType t, std::string const& text,
cmListFileBacktrace const& backtrace); cmListFileBacktrace const& backtrace = cmListFileBacktrace());
///! run the --build option ///! run the --build option
int Build(const std::string& dir, int Build(const std::string& dir,
const std::string& target, const std::string& target,