summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmListFileCache.cxx26
-rw-r--r--Source/cmListFileCache.h4
-rw-r--r--Source/cmake.cxx1
3 files changed, 8 insertions, 23 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 2756cd2..ffe1a1f 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -405,29 +405,17 @@ void cmListFileBacktrace::Append(cmListFileContext const& context)
this->push_back(context);
}
-//----------------------------------------------------------------------------
-void cmListFileBacktrace::MakeRelative()
-{
- if (this->Relative)
- {
- return;
- }
- for (cmListFileBacktrace::iterator i = this->begin();
- i != this->end(); ++i)
- {
- i->FilePath = this->LocalGenerator->Convert(i->FilePath,
- cmLocalGenerator::HOME);
- }
- this->Relative = true;
-}
-
void cmListFileBacktrace::PrintTitle(std::ostream& out)
{
if (this->empty())
{
return;
}
- out << (this->front().Line ? " at " : " in ") << this->front();
+
+ cmListFileContext lfc = this->front();
+ lfc.FilePath = this->LocalGenerator->Convert(lfc.FilePath,
+ cmLocalGenerator::HOME);
+ out << (lfc.Line ? " at " : " in ") << lfc;
}
void cmListFileBacktrace::PrintCallStack(std::ostream& out)
@@ -441,7 +429,9 @@ void cmListFileBacktrace::PrintCallStack(std::ostream& out)
out << "Call Stack (most recent call first):\n";
while(i != this->end())
{
- cmListFileContext const& lfc = *i;
+ cmListFileContext lfc = *i;
+ lfc.FilePath = this->LocalGenerator->Convert(lfc.FilePath,
+ cmLocalGenerator::HOME);
out << " " << lfc << "\n";
++i;
}
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index f85b430..1971862a 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -76,19 +76,15 @@ class cmListFileBacktrace: private std::vector<cmListFileContext>
public:
cmListFileBacktrace(cmLocalGenerator* localGen = 0)
: LocalGenerator(localGen)
- , Relative(localGen ? false : true)
{
}
void Append(cmListFileContext const& context);
- void MakeRelative();
-
void PrintTitle(std::ostream& out);
void PrintCallStack(std::ostream& out);
private:
cmLocalGenerator* LocalGenerator;
- bool Relative;
};
struct cmListFile
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 23803ef..6cd005e 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2519,7 +2519,6 @@ void cmake::IssueMessage(cmake::MessageType t, std::string const& text,
cmListFileBacktrace const& bt)
{
cmListFileBacktrace backtrace = bt;
- backtrace.MakeRelative();
std::ostringstream msg;
if (!this->PrintMessagePreamble(t, msg))