diff options
author | Brad King <brad.king@kitware.com> | 2007-12-18 14:50:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-12-18 14:50:08 (GMT) |
commit | 872553de7e729788242da37124f41e40228c6f13 (patch) | |
tree | 1bb9aaa4a3fa205c260f09b8eaa80efba79ec7ac /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | 42bad89fe7ba61bed1f0ba293e8497970df2cef0 (diff) | |
download | CMake-872553de7e729788242da37124f41e40228c6f13.zip CMake-872553de7e729788242da37124f41e40228c6f13.tar.gz CMake-872553de7e729788242da37124f41e40228c6f13.tar.bz2 |
ENH: Implemented generation of display for pre-build, pre-link, and post-build custom command comments during the build. This addresses issue #5353.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 6fa4dd9..f6c091a 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -902,7 +902,7 @@ cmLocalUnixMakefileGenerator3 for(std::vector<cmCustomCommand>::const_iterator i = ccs.begin(); i != ccs.end(); ++i) { - this->AppendCustomCommand(commands, *i); + this->AppendCustomCommand(commands, *i, true); } } @@ -910,8 +910,22 @@ cmLocalUnixMakefileGenerator3 void cmLocalUnixMakefileGenerator3 ::AppendCustomCommand(std::vector<std::string>& commands, - const cmCustomCommand& cc) + const cmCustomCommand& cc, bool echo_comment) { + // Optionally create a command to display the custom command's + // comment text. This is used for pre-build, pre-link, and + // post-build command comments. Custom build step commands have + // their comments generated elsewhere. + if(echo_comment) + { + const char* comment = cc.GetComment(); + if(comment && *comment) + { + this->AppendEcho(commands, comment, + cmLocalUnixMakefileGenerator3::EchoGenerate); + } + } + // if the command specified a working directory use it. const char* dir = this->Makefile->GetStartOutputDirectory(); const char* workingDir = cc.GetWorkingDirectory(); |