ENH: Added CreateSymlink method.

This commit is contained in:
Brad King 2003-11-26 14:52:12 -05:00
parent 725de95b7e
commit 9a58ac6649
2 changed files with 12 additions and 1 deletions

View File

@ -1060,3 +1060,13 @@ bool cmSystemTools::StringEndsWith(const char* str1, const char* str2)
}
return !strncmp(str1 + (strlen(str1)-strlen(str2)), str2, strlen(str2));
}
bool cmSystemTools::CreateSymlink(const char* origName, const char* newName)
{
#if !defined(_WIN32) || defined(__CYGWIN__)
return (symlink(origName, newName) >= 0);
#else
// Should we create a copy here?
return false;
#endif
}

View File

@ -243,7 +243,8 @@ public:
//! Check if the first string ends with the second one.
static bool StringEndsWith(const char* str1, const char* str2);
static bool CreateSymlink(const char* origName, const char* newName);
private:
static bool s_ForceUnixPaths;
static bool s_RunCommandHideConsole;