diff options
author | Bruno Manganelli <bruno.manga95@gmail.com> | 2018-11-23 18:52:26 (GMT) |
---|---|---|
committer | Bruno Manganelli <bruno.manga95@gmail.com> | 2019-01-27 15:48:57 (GMT) |
commit | b6a957c9696706a338cdeef63540bf8a4c42d22d (patch) | |
tree | 48b0536c2d1ba352576910dcfb44490b75ffde92 /Source/cmListFileCache.cxx | |
parent | 05e4fa47738bf44e8ee6501b415df2899b10f6da (diff) | |
download | CMake-b6a957c9696706a338cdeef63540bf8a4c42d22d.zip CMake-b6a957c9696706a338cdeef63540bf8a4c42d22d.tar.gz CMake-b6a957c9696706a338cdeef63540bf8a4c42d22d.tar.bz2 |
cmOutputConverter: move ConvertToRelativePath to cmStateDirectory.
Diffstat (limited to 'Source/cmListFileCache.cxx')
-rw-r--r-- | Source/cmListFileCache.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index 9aa1f32..aa53552 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -5,8 +5,8 @@ #include "cmListFileLexer.h" #include "cmMessageType.h" #include "cmMessenger.h" -#include "cmOutputConverter.h" #include "cmState.h" +#include "cmStateDirectory.h" #include "cmSystemTools.h" #include <assert.h> @@ -390,9 +390,8 @@ void cmListFileBacktrace::PrintTitle(std::ostream& out) const } cmListFileContext lfc = this->TopEntry->Context; cmStateSnapshot bottom = this->GetBottom(); - cmOutputConverter converter(bottom); if (!bottom.GetState()->GetIsInTryCompile()) { - lfc.FilePath = converter.ConvertToRelativePath( + lfc.FilePath = bottom.GetDirectory().ConvertToRelPathIfNotContained( bottom.GetState()->GetSourceDirectory(), lfc.FilePath); } out << (lfc.Line ? " at " : " in ") << lfc; @@ -409,7 +408,6 @@ void cmListFileBacktrace::PrintCallStack(std::ostream& out) const bool first = true; cmStateSnapshot bottom = this->GetBottom(); - cmOutputConverter converter(bottom); for (Entry const* cur = this->TopEntry->Parent.get(); !cur->IsBottom(); cur = cur->Parent.get()) { if (cur->Context.Name.empty()) { @@ -423,7 +421,7 @@ void cmListFileBacktrace::PrintCallStack(std::ostream& out) const } cmListFileContext lfc = cur->Context; if (!bottom.GetState()->GetIsInTryCompile()) { - lfc.FilePath = converter.ConvertToRelativePath( + lfc.FilePath = bottom.GetDirectory().ConvertToRelPathIfNotContained( bottom.GetState()->GetSourceDirectory(), lfc.FilePath); } out << " " << lfc << "\n"; |