summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.h
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-10-14 15:46:30 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-10-14 15:46:30 (GMT)
commitef8385744b03068f53dc2710c53d160d05e7cf2a (patch)
tree754c829d031cd5bb8859f7ce4659257cadea26be /Source/cmSystemTools.h
parent78e8f12b86e7e4d21c8af1463a166341ba7398e7 (diff)
downloadCMake-ef8385744b03068f53dc2710c53d160d05e7cf2a.zip
CMake-ef8385744b03068f53dc2710c53d160d05e7cf2a.tar.gz
CMake-ef8385744b03068f53dc2710c53d160d05e7cf2a.tar.bz2
BUG: allow split string to know if it is separating a path
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r--Source/cmSystemTools.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index a5046e4..43a5daf 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -279,8 +279,13 @@ public:
*/
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 = '/');
+ /** split a path by separator into an array of strings, default is /.
+ If isPath is true then the string is treated like a path and if
+ s starts with a / then the first element of the returned array will
+ be /, so /foo/bar will be [/, foo, bar]
+ */
+ static std::vector<cmStdString> SplitString(const char* s, char separator = '/',
+ bool isPath = false);
/** put a string into the environment
of the form var=value */
static bool PutEnv(const char* value);