ENH: do not remove executables and dll's before linking them so that incremental links work, incremental links are still broken for vs 2005 and greater because of the manifest stuff

This commit is contained in:
Bill Hoffman 2007-10-18 09:38:34 -04:00
parent 5c4eadba23
commit 0fc4d10e38
2 changed files with 14 additions and 21 deletions

View File

@ -329,18 +329,6 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
cmLocalGenerator::UNCHANGED));
}
// Add a command to remove any existing files for this executable.
std::vector<std::string> commands1;
this->LocalGenerator->AppendCleanCommand(commands1, exeCleanFiles,
*this->Target, "target");
this->LocalGenerator->CreateCDCommand
(commands1,
this->Makefile->GetStartOutputDirectory(),
this->Makefile->GetHomeOutputDirectory());
commands.insert(commands.end(), commands1.begin(), commands1.end());
commands1.clear();
// Add the pre-build and pre-link rules building but not when relinking.
if(!relink)
{
@ -356,6 +344,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
linkRuleVar += "_LINK_EXECUTABLE";
std::string linkRule =
this->Makefile->GetRequiredDefinition(linkRuleVar.c_str());
std::vector<std::string> commands1;
cmSystemTools::ExpandListArgument(linkRule, commands1);
if(this->Target->GetPropertyAsBool("ENABLE_EXPORTS"))
{

View File

@ -643,16 +643,20 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
}
#endif
// Add a command to remove any existing files for this library.
std::vector<std::string> commands1;
this->LocalGenerator->AppendCleanCommand(commands1, libCleanFiles,
*this->Target, "target");
this->LocalGenerator->CreateCDCommand
(commands1,
this->Makefile->GetStartOutputDirectory(),
this->Makefile->GetHomeOutputDirectory());
commands.insert(commands.end(), commands1.begin(), commands1.end());
commands1.clear();
// Add a command to remove any existing files for this library.
// for static libs only
if(this->Target->GetType() == cmTarget::STATIC_LIBRARY)
{
this->LocalGenerator->AppendCleanCommand(commands1, libCleanFiles,
*this->Target, "target");
this->LocalGenerator->CreateCDCommand
(commands1,
this->Makefile->GetStartOutputDirectory(),
this->Makefile->GetHomeOutputDirectory());
commands.insert(commands.end(), commands1.begin(), commands1.end());
commands1.clear();
}
// Add the pre-build and pre-link rules building but not when relinking.
if(!relink)