ENH: Adding inclusion of pre-build and pre-link commands when building executables and libraries.

This commit is contained in:
Brad King 2005-02-25 09:19:04 -05:00
parent f11f012cd7
commit cf8fb5c6f8
1 changed files with 6 additions and 4 deletions

View File

@ -779,8 +779,6 @@ cmLocalUnixMakefileGenerator2
ruleFileStream ruleFileStream
<< "# Utility rule file for " << target.GetName() << ".\n\n"; << "# Utility rule file for " << target.GetName() << ".\n\n";
// TODO: Pre-build and pre-link rules.
// Collect the commands and dependencies. // Collect the commands and dependencies.
std::vector<std::string> commands; std::vector<std::string> commands;
std::vector<std::string> depends; std::vector<std::string> depends;
@ -1645,7 +1643,9 @@ cmLocalUnixMakefileGenerator2
// Add target-specific linker flags. // Add target-specific linker flags.
this->AppendFlags(linkFlags, target.GetProperty("LINK_FLAGS")); this->AppendFlags(linkFlags, target.GetProperty("LINK_FLAGS"));
// TODO: Pre-build and pre-link rules. // Add the pre-build and pre-link rules.
this->AppendCustomCommands(commands, target.GetPreBuildCommands());
this->AppendCustomCommands(commands, target.GetPreLinkCommands());
// Construct the main link rule. // Construct the main link rule.
std::string linkRuleVar = "CMAKE_"; std::string linkRuleVar = "CMAKE_";
@ -1891,7 +1891,9 @@ cmLocalUnixMakefileGenerator2
} }
this->AppendCleanCommand(commands, cleanFiles); this->AppendCleanCommand(commands, cleanFiles);
// TODO: Pre-build and pre-link rules. // Add the pre-build and pre-link rules.
this->AppendCustomCommands(commands, target.GetPreBuildCommands());
this->AppendCustomCommands(commands, target.GetPreLinkCommands());
// Construct the main link rule. // Construct the main link rule.
std::string linkRule = m_Makefile->GetRequiredDefinition(linkRuleVar); std::string linkRule = m_Makefile->GetRequiredDefinition(linkRuleVar);