diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-10-13 15:37:55 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-10-13 15:37:55 (GMT) |
commit | 78e8f12b86e7e4d21c8af1463a166341ba7398e7 (patch) | |
tree | b14ed6889636b1828e3aefe6012bc03883e969b9 /Source/cmSystemTools.h | |
parent | 68c3550faa5793a0445c457d65b2f491cee559df (diff) | |
download | CMake-78e8f12b86e7e4d21c8af1463a166341ba7398e7.zip CMake-78e8f12b86e7e4d21c8af1463a166341ba7398e7.tar.gz CMake-78e8f12b86e7e4d21c8af1463a166341ba7398e7.tar.bz2 |
BUG: fix and comment relative path funciton
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r-- | Source/cmSystemTools.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index ad2fe43..a5046e4 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -269,8 +269,16 @@ public: static bool CreateSymlink(const char* origName, const char* newName); - ///! compute the relative path from local to remote + /** compute the relative path from local to remote. local must + be a directory. remote can be a file or a directory. + Both remote and local must be full paths. Basically, if + you are in directory local and you want to access the file in remote + what is the relative path to do that. For example: + /a/b/c/d to /a/b/c1/d1 -> ../../c1/d1 + from /usr/src to /usr/src/test/blah/foo.cpp -> test/blah/foo.cpp + */ static std::string RelativePath(const char* local, const char* remote); + ///! split a path by separator into an array of strings, default is / static std::vector<cmStdString> SplitString(const char* s, char separator = '/'); /** put a string into the environment |