summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmComputeTargetDepends.cxx10
-rw-r--r--Source/cmGlobalGenerator.cxx12
-rw-r--r--Source/cmTarget.cxx3
-rw-r--r--Source/cmake.cxx2
-rw-r--r--Source/cmake.h4
5 files changed, 14 insertions, 17 deletions
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index eb62455..f28217f 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -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);
}
}
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index bb818eb..6c8be72 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -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;
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index f3286d4..56b98f7 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -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);
}
//----------------------------------------------------------------------------
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 16dc724..45d3c21 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2786,7 +2786,7 @@ void cmake::RunCheckForUnusedVariables()
}
if(haveUnused)
{
- this->IssueMessage(cmake::WARNING, msg.str(), cmListFileBacktrace());
+ this->IssueMessage(cmake::WARNING, msg.str());
}
#endif
}
diff --git a/Source/cmake.h b/Source/cmake.h
index 329b439..47e25d5 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -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,