summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.h
diff options
context:
space:
mode:
authorPavel Shramov <Pavel.Shramov@micex.com>2013-06-19 12:35:23 (GMT)
committerBrad King <brad.king@kitware.com>2013-06-26 14:14:31 (GMT)
commit551d3343cd16c566be4b33e96c892c3e769951af (patch)
tree38c2742a39cdc4234fab4d89cf97f3bfa514e56b /Source/cmSystemTools.h
parent7c61c73fbc1c508a6622b444e06c7fc9a0c280f1 (diff)
downloadCMake-551d3343cd16c566be4b33e96c892c3e769951af.zip
CMake-551d3343cd16c566be4b33e96c892c3e769951af.tar.gz
CMake-551d3343cd16c566be4b33e96c892c3e769951af.tar.bz2
cmDependsC: Collapse relative include paths
While calculating dependencies collapse sequences such as ../../../a/b/c/../../d/e/../../e/f to avoid total path lengths over the Windows path length limit as much as possible.
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r--Source/cmSystemTools.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index ec53929..9614449 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -365,6 +365,12 @@ public:
*/
static std::string RelativePath(const char* local, const char* remote);
+ /** Joins two paths while collapsing x/../ parts
+ * For example CollapseCombinedPath("a/b/c", "../../d") results in "a/d"
+ */
+ static std::string CollapseCombinedPath(std::string const& dir,
+ std::string const& file);
+
#ifdef CMAKE_BUILD_WITH_CMAKE
/** Remove an environment variable */
static bool UnsetEnv(const char* value);