BUG: If the destination is the same as source, do not copy file. Fixes Bug #956 - make install broken

This commit is contained in:
Andy Cedilnik 2004-07-02 11:51:30 -04:00
parent 9d61ea38dd
commit 04a8572b99
1 changed files with 42 additions and 39 deletions

View File

@ -549,6 +549,8 @@ bool cmFileCommand::HandleInstallCommand(
break;
}
if ( !cmSystemTools::SameFile(ctarget.c_str(), destfile.c_str()) )
{
if ( cmSystemTools::FileExists(ctarget.c_str()) )
{
cmSystemTools::RemoveFile(destfile.c_str());
@ -597,6 +599,7 @@ bool cmFileCommand::HandleInstallCommand(
}
}
}
}
m_Makefile->AddDefinition("CMAKE_INSTALL_MANIFEST_FILES",
smanifest_files.c_str());