BUG: The cmake_symlink_library command needs to remove existing files before creating links.
This commit is contained in:
parent
f764e1fcb2
commit
5bbc45d589
@ -727,6 +727,10 @@ int cmake::CMakeCommand(std::vector<std::string>& args)
|
|||||||
if(soName != realName)
|
if(soName != realName)
|
||||||
{
|
{
|
||||||
std::string fname = cmSystemTools::GetFilenameName(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()))
|
if(!cmSystemTools::CreateSymlink(fname.c_str(), soName.c_str()))
|
||||||
{
|
{
|
||||||
result = 1;
|
result = 1;
|
||||||
@ -735,6 +739,10 @@ int cmake::CMakeCommand(std::vector<std::string>& args)
|
|||||||
if(name != soName)
|
if(name != soName)
|
||||||
{
|
{
|
||||||
std::string fname = cmSystemTools::GetFilenameName(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()))
|
if(!cmSystemTools::CreateSymlink(fname.c_str(), name.c_str()))
|
||||||
{
|
{
|
||||||
result = 1;
|
result = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user