diff options
author | Brad King <brad.king@kitware.com> | 2005-02-25 14:19:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-02-25 14:19:04 (GMT) |
commit | cf8fb5c6f8d9f16486d498849d86df5a025373c9 (patch) | |
tree | a6a0221a402967a1111c37a1dc2dead049790cb4 /Source | |
parent | f11f012cd7c7d4cc3be4bd08a28dd1f0afb923ee (diff) | |
download | CMake-cf8fb5c6f8d9f16486d498849d86df5a025373c9.zip CMake-cf8fb5c6f8d9f16486d498849d86df5a025373c9.tar.gz CMake-cf8fb5c6f8d9f16486d498849d86df5a025373c9.tar.bz2 |
ENH: Adding inclusion of pre-build and pre-link commands when building executables and libraries.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator2.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator2.cxx b/Source/cmLocalUnixMakefileGenerator2.cxx index 85256a6..2bf1b33 100644 --- a/Source/cmLocalUnixMakefileGenerator2.cxx +++ b/Source/cmLocalUnixMakefileGenerator2.cxx @@ -779,8 +779,6 @@ cmLocalUnixMakefileGenerator2 ruleFileStream << "# Utility rule file for " << target.GetName() << ".\n\n"; - // TODO: Pre-build and pre-link rules. - // Collect the commands and dependencies. std::vector<std::string> commands; std::vector<std::string> depends; @@ -1645,7 +1643,9 @@ cmLocalUnixMakefileGenerator2 // Add target-specific linker 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. std::string linkRuleVar = "CMAKE_"; @@ -1891,7 +1891,9 @@ cmLocalUnixMakefileGenerator2 } 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. std::string linkRule = m_Makefile->GetRequiredDefinition(linkRuleVar); |