summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-02-20 19:56:29 (GMT)
committerBrad King <brad.king@kitware.com>2008-02-20 19:56:29 (GMT)
commit454da64c99200de6c1b11ef79f5ef67f4767cf16 (patch)
tree09c6306faa9c8373f16868ebf1ba683be477ca0f /Source/cmMakefileTargetGenerator.cxx
parent5e72a0d4e4e5ddd6817b294942af41dbb76b1e01 (diff)
downloadCMake-454da64c99200de6c1b11ef79f5ef67f4767cf16.zip
CMake-454da64c99200de6c1b11ef79f5ef67f4767cf16.tar.gz
CMake-454da64c99200de6c1b11ef79f5ef67f4767cf16.tar.bz2
BUG: Link scripts should be generated with copy-if-different and included as a dependency of the link rule.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 135b199..08cf6df 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1563,13 +1563,15 @@ void
cmMakefileTargetGenerator
::CreateLinkScript(const char* name,
std::vector<std::string> const& link_commands,
- std::vector<std::string>& makefile_commands)
+ std::vector<std::string>& makefile_commands,
+ std::vector<std::string>& makefile_depends)
{
// Create the link script file.
std::string linkScriptName = this->TargetBuildDirectoryFull;
linkScriptName += "/";
linkScriptName += name;
cmGeneratedFileStream linkScriptStream(linkScriptName.c_str());
+ linkScriptStream.SetCopyIfDifferent(true);
for(std::vector<std::string>::const_iterator cmd = link_commands.begin();
cmd != link_commands.end(); ++cmd)
{
@@ -1588,6 +1590,7 @@ cmMakefileTargetGenerator
cmLocalGenerator::SHELL);
link_command += " --verbose=$(VERBOSE)";
makefile_commands.push_back(link_command);
+ makefile_depends.push_back(linkScriptName);
}
//----------------------------------------------------------------------------