summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmOutputConverter.cxx15
-rw-r--r--Source/cmOutputConverter.h2
2 files changed, 13 insertions, 4 deletions
diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx
index 80fa4bf..176c9a0 100644
--- a/Source/cmOutputConverter.cxx
+++ b/Source/cmOutputConverter.cxx
@@ -46,11 +46,9 @@ std::string cmOutputConverter::ConvertToOutputForExisting(
return this->ConvertToOutputFormat(remote, format);
}
-std::string cmOutputConverter::Convert(const std::string& source,
- RelativeRoot relative,
- OutputFormat output) const
+std::string cmOutputConverter::ConvertToRelativePath(
+ const std::string& source, RelativeRoot relative) const
{
- // Convert the path to a relative path.
std::string result = source;
switch (relative) {
@@ -76,6 +74,15 @@ std::string cmOutputConverter::Convert(const std::string& source,
result = cmSystemTools::CollapseFullPath(result);
break;
}
+ return result;
+}
+
+std::string cmOutputConverter::Convert(const std::string& source,
+ RelativeRoot relative,
+ OutputFormat output) const
+{
+ // Convert the path to a relative path.
+ std::string result = this->ConvertToRelativePath(source, relative);
return this->ConvertToOutputFormat(result, output);
}
diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h
index 0f4884e..71bb086 100644
--- a/Source/cmOutputConverter.h
+++ b/Source/cmOutputConverter.h
@@ -56,6 +56,8 @@ public:
OutputFormat output) const;
std::string Convert(const std::string& remote, RelativeRoot local,
OutputFormat output = UNCHANGED) const;
+ std::string ConvertToRelativePath(const std::string& remote,
+ RelativeRoot local) const;
std::string ConvertDirectorySeparatorsForShell(
const std::string& source) const;