summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-11-26 22:34:01 (GMT)
committerBrad King <brad.king@kitware.com>2003-11-26 22:34:01 (GMT)
commit5bbc45d589ba0a5725c232c57de38d8e8ea97598 (patch)
tree50d4bcc3a041d6865302d4e5b0c665ae90861753 /Source/cmake.cxx
parentf764e1fcb2b23e4fac5579dbfefa18404dcc95b5 (diff)
downloadCMake-5bbc45d589ba0a5725c232c57de38d8e8ea97598.zip
CMake-5bbc45d589ba0a5725c232c57de38d8e8ea97598.tar.gz
CMake-5bbc45d589ba0a5725c232c57de38d8e8ea97598.tar.bz2
BUG: The cmake_symlink_library command needs to remove existing files before creating links.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 5a478d0..8cc6f7a 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -727,6 +727,10 @@ int cmake::CMakeCommand(std::vector<std::string>& args)
if(soName != realName)
{
std::string fname = cmSystemTools::GetFilenameName(realName);
+ if(cmSystemTools::FileExists(soName.c_str()))
+ {
+ cmSystemTools::RemoveFile(soName.c_str());
+ }
if(!cmSystemTools::CreateSymlink(fname.c_str(), soName.c_str()))
{
result = 1;
@@ -735,6 +739,10 @@ int cmake::CMakeCommand(std::vector<std::string>& args)
if(name != soName)
{
std::string fname = cmSystemTools::GetFilenameName(soName);
+ if(cmSystemTools::FileExists(soName.c_str()))
+ {
+ cmSystemTools::RemoveFile(name.c_str());
+ }
if(!cmSystemTools::CreateSymlink(fname.c_str(), name.c_str()))
{
result = 1;