summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r--Source/cmSystemTools.h32
1 files changed, 21 insertions, 11 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 4d98dc8..199d29c 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -13,14 +13,17 @@
See COPYRIGHT.txt for copyright details.
=========================================================================*/
-/**
- * cmSystemTools - a collection of useful functions for CMake.
- */
#ifndef cmSystemTools_h
#define cmSystemTools_h
#include "cmStandardIncludes.h"
+/** \class cmSystemTools
+ * \brief A collection of useful functions for CMake.
+ *
+ * cmSystemTools is a class that provides helper functions
+ * for the CMake build system.
+ */
class cmSystemTools
{
public:
@@ -30,47 +33,54 @@ public:
* prior to calling this function.
*/
static bool MakeDirectory(const char* path);
+
/**
- * Replace replace all occurances of the string in in
- * souce string.
+ * Replace replace all occurances of the string in
+ * the source string.
*/
static void ReplaceString(std::string& source,
const char* replace,
const char* with);
+
/**
- * Replace windows slashes with unix style slashes
+ * Replace Windows file system slashes with Unix-style slashes.
*/
static void ConvertToUnixSlashes(std::string& path);
/**
- * Return true if a file exists
+ * Return true if a file exists in the current directory.
*/
static bool FileExists(const char* filename);
+
/**
- * Return the number of times expression occurs in file in dir
+ * Return the number of times the given expression occurs in the file
+ * specified by the concatenation of dir/file.
*/
static int Grep(const char* dir, const char* file, const char* expression);
/**
- * remove /cygdrive/d and replace with d:/
+ * Convert a path containing a cygwin drive specifier to its natural
+ * equivalent.
*/
static void ConvertCygwinPath(std::string& pathname);
/**
- * Read a cmake function from an input file. This
+ * Read a CMake rule (or function) from an input file. This
* returns the name of the function and a list of its
* arguments.
*/
static bool ParseFunction(std::ifstream&,
std::string& name,
std::vector<std::string>& arguments);
+
/**
- * Extract space separated arguments from a string.
+ * Extract white-space separated arguments from a string.
* Double quoted strings are accepted with spaces.
* This is called by ParseFunction.
*/
static void GetArguments(std::string& line,
std::vector<std::string>& arguments);
+
/**
* Display an error message.
*/