summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-02-13 15:16:36 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-02-13 15:17:08 (GMT)
commit8914d4317a21a5673afbc72312559cc53e73eeec (patch)
treecb5609ef9ed6da7c4f819f089c266d994b6af4a3 /Source/cmSystemTools.h
parent264128469df1460c60099a3321b80cedcf8d2d26 (diff)
parent080a79ca4a0448043e0713b9b580c5f84b7330b3 (diff)
downloadCMake-8914d4317a21a5673afbc72312559cc53e73eeec.zip
CMake-8914d4317a21a5673afbc72312559cc53e73eeec.tar.gz
CMake-8914d4317a21a5673afbc72312559cc53e73eeec.tar.bz2
Merge topic 'systools-stdstring2'
080a79ca4a cmSystemTools: More methods accept `std::string` params Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2952
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r--Source/cmSystemTools.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 88758a6..ba6de51 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -144,16 +144,16 @@ public:
static bool IsPathToFramework(const char* value);
static bool DoesFileExistWithExtensions(
- const char* name, const std::vector<std::string>& sourceExts);
+ const std::string& name, const std::vector<std::string>& sourceExts);
/**
* Check if the given file exists in one of the parent directory of the
* given file or directory and if it does, return the name of the file.
* Toplevel specifies the top-most directory to where it will look.
*/
- static std::string FileExistsInParentDirectories(const char* fname,
- const char* directory,
- const char* toplevel);
+ static std::string FileExistsInParentDirectories(
+ const std::string& fname, const std::string& directory,
+ const std::string& toplevel);
static void Glob(const std::string& directory, const std::string& regexp,
std::vector<std::string>& files);
@@ -443,13 +443,15 @@ public:
/** Copy the file create/access/modify times from the file named by
the first argument to that named by the second. */
- static bool CopyFileTime(const char* fromFile, const char* toFile);
+ static bool CopyFileTime(const std::string& fromFile,
+ const std::string& toFile);
/** Save and restore file times. */
static cmSystemToolsFileTime* FileTimeNew();
static void FileTimeDelete(cmSystemToolsFileTime*);
- static bool FileTimeGet(const char* fname, cmSystemToolsFileTime* t);
- static bool FileTimeSet(const char* fname, cmSystemToolsFileTime* t);
+ static bool FileTimeGet(const std::string& fname, cmSystemToolsFileTime* t);
+ static bool FileTimeSet(const std::string& fname,
+ const cmSystemToolsFileTime* t);
/** Random seed generation. */
static unsigned int RandomSeed();