diff options
author | Brad King <brad.king@kitware.com> | 2014-03-10 19:47:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-12 14:44:01 (GMT) |
commit | bc993f277ebd44fabe8312a85c5682eed011336d (patch) | |
tree | 3f385f5257072c0eb18aa64badfe282eb41e3996 /Source/cmLocalGenerator.cxx | |
parent | 9a5c55441418ef79415b9a1b99c35192d2b8c1b0 (diff) | |
download | CMake-bc993f277ebd44fabe8312a85c5682eed011336d.zip CMake-bc993f277ebd44fabe8312a85c5682eed011336d.tar.gz CMake-bc993f277ebd44fabe8312a85c5682eed011336d.tar.bz2 |
Generalize cmCustomCommandGenerator to more fields
Until now the cmCustomCommandGenerator was used only to compute the
command lines of a custom command. Generalize it to get the comment,
working directory, dependencies, and outputs of custom commands. Update
use in all generators to support this.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index de8dd51..ebcfa08 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -22,6 +22,7 @@ #include "cmSourceFile.h" #include "cmTest.h" #include "cmTestGenerator.h" +#include "cmCustomCommandGenerator.h" #include "cmVersion.h" #include "cmake.h" @@ -2482,23 +2483,23 @@ void cmLocalGenerator::AppendFeatureOptions( //---------------------------------------------------------------------------- std::string -cmLocalGenerator::ConstructComment(const cmCustomCommand& cc, +cmLocalGenerator::ConstructComment(cmCustomCommandGenerator const& ccg, const char* default_comment) { // Check for a comment provided with the command. - if(cc.GetComment()) + if(ccg.GetComment()) { - return cc.GetComment(); + return ccg.GetComment(); } // Construct a reasonable default comment if possible. - if(!cc.GetOutputs().empty()) + if(!ccg.GetOutputs().empty()) { std::string comment; comment = "Generating "; const char* sep = ""; - for(std::vector<std::string>::const_iterator o = cc.GetOutputs().begin(); - o != cc.GetOutputs().end(); ++o) + for(std::vector<std::string>::const_iterator o = ccg.GetOutputs().begin(); + o != ccg.GetOutputs().end(); ++o) { comment += sep; comment += this->Convert(*o, cmLocalGenerator::START_OUTPUT); |