Commit efc20569 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

cmake: remove dummy backtraces for IssueMessage

parent d46c650d
......@@ -386,15 +386,17 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
e << "The dependency target \"" << dependee_name
<< "\" of target \"" << depender->GetName() << "\" does not exist.";
cmListFileBacktrace nullBacktrace;
cmListFileBacktrace const* backtrace =
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);
}
}
......
......@@ -1282,8 +1282,7 @@ void cmGlobalGenerator::Generate()
if(!this->GenerateCPackPropertiesFile())
{
this->GetCMakeInstance()->IssueMessage(
cmake::FATAL_ERROR, "Could not write CPack properties file.",
cmListFileBacktrace());
cmake::FATAL_ERROR, "Could not write CPack properties file.");
}
for (std::map<std::string, cmExportBuildFileGenerator*>::iterator
......@@ -1294,8 +1293,7 @@ void cmGlobalGenerator::Generate()
&& !cmSystemTools::GetErrorOccuredFlag())
{
this->GetCMakeInstance()
->IssueMessage(cmake::FATAL_ERROR, "Could not write export file.",
cmListFileBacktrace());
->IssueMessage(cmake::FATAL_ERROR, "Could not write export file.");
return;
}
}
......@@ -1324,8 +1322,7 @@ void cmGlobalGenerator::Generate()
{
w << " " << *iter << "\n";
}
this->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING, w.str(),
cmListFileBacktrace());
this->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING, w.str());
}
this->CMakeInstance->UpdateProgress("Generating done", -1);
......@@ -1525,8 +1522,7 @@ cmGlobalGenerator::GetGeneratorTarget(cmTarget const* t) const
if(ti == this->GeneratorTargets.end())
{
this->CMakeInstance->IssueMessage(
cmake::INTERNAL_ERROR, "Missing cmGeneratorTarget instance!",
cmListFileBacktrace());
cmake::INTERNAL_ERROR, "Missing cmGeneratorTarget instance!");
return 0;
}
return ti->second;
......
......@@ -5167,8 +5167,7 @@ cmTarget::ReportPropertyOrigin(const std::string &p,
areport += result;
areport += "\"):\n" + report;
cmListFileBacktrace lfbt;
this->Makefile->GetCMakeInstance()->IssueMessage(cmake::LOG, areport, lfbt);
this->Makefile->GetCMakeInstance()->IssueMessage(cmake::LOG, areport);
}
//----------------------------------------------------------------------------
......
......@@ -2786,7 +2786,7 @@ void cmake::RunCheckForUnusedVariables()
}
if(haveUnused)
{
this->IssueMessage(cmake::WARNING, msg.str(), cmListFileBacktrace());
this->IssueMessage(cmake::WARNING, msg.str());
}
#endif
}
......@@ -13,6 +13,7 @@
#ifndef cmake_h
#define cmake_h
#include "cmListFileCache.h"
#include "cmSystemTools.h"
#include "cmPropertyDefinitionMap.h"
#include "cmPropertyMap.h"
......@@ -29,7 +30,6 @@ class cmFileTimeComparison;
class cmExternalMakefileProjectGenerator;
class cmDocumentationSection;
class cmPolicies;
class cmListFileBacktrace;
class cmTarget;
class cmGeneratedFileStream;
......@@ -360,7 +360,7 @@ class cmake
/** Display a message to the user. */
void IssueMessage(cmake::MessageType t, std::string const& text,
cmListFileBacktrace const& backtrace);
cmListFileBacktrace const& backtrace = cmListFileBacktrace());
///! run the --build option
int Build(const std::string& dir,
const std::string& target,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment