diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-06-16 19:37:57 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-09-17 08:29:48 (GMT) |
commit | 149af87b86362449a99301860af5aac1a3b4b20c (patch) | |
tree | 08e907a26f5346de2105f098b901afd4bc856b5c /Source/cmOutputConverter.h | |
parent | 00fd64d1263901f96935e15c8d90ee8a338cee1a (diff) | |
download | CMake-149af87b86362449a99301860af5aac1a3b4b20c.zip CMake-149af87b86362449a99301860af5aac1a3b4b20c.tar.gz CMake-149af87b86362449a99301860af5aac1a3b4b20c.tar.bz2 |
cmOutputConverter: split ConvertToRelativePath
Split the ConvertToRelativePath funtion into ConvertToRelativePath and
ForceToRelativePath. Both functions take the local path as a string
rather than a vector of path segments. Reimplement the old interface on
top of the two new functions for interface compatibility.
Diffstat (limited to 'Source/cmOutputConverter.h')
-rw-r--r-- | Source/cmOutputConverter.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index ac58ddc..1efe109 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -145,6 +145,24 @@ public: const std::string& in_remote, bool force = false) const; + /** + * Convert the given remote path to a relative path with respect to + * the given local path. Both paths must use forward slashes and not + * already be escaped or quoted. + * The conversion is skipped if the paths are not both in the source + * or both in the binary tree. + */ + std::string ConvertToRelativePath(std::string const& local_path, + std::string const& remote_path) const; + + /** + * Convert the given remote path to a relative path with respect to + * the given local path. Both paths must use forward slashes and not + * already be escaped or quoted. + */ + static std::string ForceToRelativePath(std::string const& local_path, + std::string const& remote_path); + private: cmState* GetState() const; |