summaryrefslogtreecommitdiffstats
path: root/Source/cmListFileCache.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-01-29 14:17:13 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-01-29 14:18:42 (GMT)
commit60c06620a690f0cbeeaa3fba762e19cd031669ca (patch)
treec72e5f4bd45dc2a769e0c7f7bcbbfbd108f0e0f7 /Source/cmListFileCache.cxx
parent90ac5e6384735deb0ac523684010b2f4701d4f4d (diff)
parentb6a957c9696706a338cdeef63540bf8a4c42d22d (diff)
downloadCMake-60c06620a690f0cbeeaa3fba762e19cd031669ca.zip
CMake-60c06620a690f0cbeeaa3fba762e19cd031669ca.tar.gz
CMake-60c06620a690f0cbeeaa3fba762e19cd031669ca.tar.bz2
Merge topic 'cmoutputconverter-simplify'
b6a957c969 cmOutputConverter: move ConvertToRelativePath to cmStateDirectory. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2831
Diffstat (limited to 'Source/cmListFileCache.cxx')
-rw-r--r--Source/cmListFileCache.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index cc2c09f..f855119 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";