summaryrefslogtreecommitdiffstats
path: root/Source/cmListFileCache.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmListFileCache.cxx')
-rw-r--r--Source/cmListFileCache.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 34781d3..705666d 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -12,6 +12,7 @@
#include "cmListFileCache.h"
#include "cmListFileLexer.h"
+#include "cmLocalGenerator.h"
#include "cmSystemTools.h"
#include "cmMakefile.h"
#include "cmVersion.h"
@@ -408,6 +409,23 @@ bool cmListFileParser::AddArgument(cmListFileLexer_Token* token,
}
//----------------------------------------------------------------------------
+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;
+}
+
+
+//----------------------------------------------------------------------------
std::ostream& operator<<(std::ostream& os, cmListFileContext const& lfc)
{
os << lfc.FilePath;