diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-12-07 15:58:06 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-12-07 15:58:06 (GMT) |
commit | 30a56de4b7355d3fa69545af9571105b8cae8eb9 (patch) | |
tree | 503f00ad99e6bc1a14e83c756de0c14b13d5d620 /Source/cmNMakeMakefileGenerator.cxx | |
parent | 728d20302ee99b57bd19b2bd9501500907993913 (diff) | |
download | CMake-30a56de4b7355d3fa69545af9571105b8cae8eb9.zip CMake-30a56de4b7355d3fa69545af9571105b8cae8eb9.tar.gz CMake-30a56de4b7355d3fa69545af9571105b8cae8eb9.tar.bz2 |
ENH: add custom commands for targets
Diffstat (limited to 'Source/cmNMakeMakefileGenerator.cxx')
-rw-r--r-- | Source/cmNMakeMakefileGenerator.cxx | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/Source/cmNMakeMakefileGenerator.cxx b/Source/cmNMakeMakefileGenerator.cxx index bfb612b..5c1a9de 100644 --- a/Source/cmNMakeMakefileGenerator.cxx +++ b/Source/cmNMakeMakefileGenerator.cxx @@ -459,10 +459,16 @@ void cmNMakeMakefileGenerator::OutputSharedLibraryRule(std::ostream& fout, command += "<<\n"; } + std::string customCommands = this->CreateTargetRules(t, name); + const char* cc = 0; + if(customCommands.size() > 0) + { + cc = customCommands.c_str(); + } this->OutputMakeRule(fout, "rules for a shared library", target.c_str(), depend.c_str(), - command.c_str()); + command.c_str(), cc); } void cmNMakeMakefileGenerator::OutputModuleLibraryRule(std::ostream& fout, @@ -474,7 +480,7 @@ void cmNMakeMakefileGenerator::OutputModuleLibraryRule(std::ostream& fout, void cmNMakeMakefileGenerator::OutputStaticLibraryRule(std::ostream& fout, const char* name, - const cmTarget &) + const cmTarget &t) { std::string target = m_LibraryOutputPath + std::string(name) + m_StaticLibraryExtension; std::string depend = "$("; @@ -498,11 +504,17 @@ void cmNMakeMakefileGenerator::OutputStaticLibraryRule(std::ostream& fout, std::string comment = "rule to build static library: "; comment += name; + std::string customCommands = this->CreateTargetRules(t, name); + const char* cc = 0; + if(customCommands.size() > 0) + { + cc = customCommands.c_str(); + } this->OutputMakeRule(fout, comment.c_str(), target.c_str(), depend.c_str(), - command.c_str()); + command.c_str(), cc); } void cmNMakeMakefileGenerator::OutputExecutableRule(std::ostream& fout, @@ -541,11 +553,17 @@ void cmNMakeMakefileGenerator::OutputExecutableRule(std::ostream& fout, std::string comment = "rule to build executable: "; comment += name; + std::string customCommands = this->CreateTargetRules(t, name); + const char* cc = 0; + if(customCommands.size() > 0) + { + cc = customCommands.c_str(); + } this->OutputMakeRule(fout, comment.c_str(), target.c_str(), depend.c_str(), - command.c_str()); + command.c_str(), cc); } |