summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-02-07 19:04:16 (GMT)
committerBrad King <brad.king@kitware.com>2003-02-07 19:04:16 (GMT)
commitcde384411d1907d93369c144ec7b2f28da2628d5 (patch)
tree2b5aeb18901a5c20d408b3eff32e27e82c252be8 /Source/cmSystemTools.h
parentf2b47501694f6951c97335676b2c577cbb4fd76f (diff)
downloadCMake-cde384411d1907d93369c144ec7b2f28da2628d5.zip
CMake-cde384411d1907d93369c144ec7b2f28da2628d5.tar.gz
CMake-cde384411d1907d93369c144ec7b2f28da2628d5.tar.bz2
Several fixes/improvements:
- Fixed CollapseFullPath to work on relative paths with base paths not in the current working directory. - INCLUDE command now supports relative paths (using above fix). - Added ABSOLUTE option to GET_FILENAME_COMPONENT command to unwind symlinks and relative paths. - Fixed libName_EXPORTS macro definition to be valid C identifier. - Added DEFINE_SYMBOL target propterty for customizing the export symbol. - Implemented LINK_FLAGS target propterty for libraries in VC6 and VC7. Several of these fixes were contributed by Gareth Jones.
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r--Source/cmSystemTools.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 3cd3321..e513733 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -29,6 +29,15 @@ class cmSystemTools
{
public:
/**
+ * Replace symbols in str that are not valid in C identifiers as
+ * defined by the 1999 standard, ie. anything except [A-Za-z0-9_].
+ * They are replaced with `_' and if the first character is a digit
+ * then an underscore is prepended. Note that this can produce
+ * identifiers that the standard reserves (_[A-Z].* and __.*).
+ */
+ static std::string MakeCindentifier(const char* s);
+
+ /**
* Make a new directory if it is not there. This function
* can make a full path even if none of the directories existed
* prior to calling this function.
@@ -256,8 +265,10 @@ public:
static void SplitProgramPath(const char* in_name,
std::string& dir,
std::string& file);
- static std::string CollapseFullPath(const char*);
-
+ static std::string CollapseFullPath(const char* in_relative);
+ static std::string CollapseFullPath(const char* in_relative,
+ const char* in_base);
+
///! return path of a full filename (no trailing slashes).
static std::string GetFilenamePath(const std::string&);