summaryrefslogtreecommitdiff
path: root/Source/cmCustomCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-09-28 16:40:35 -0400
committerBrad King <brad.king@kitware.com>2006-09-28 16:40:35 -0400
commit9a1d4e92eb6347dbe6d03cc861e284f6a4da5a6a (patch)
tree62bbc9236a49a4f235b010bd433745a7a7870f68 /Source/cmCustomCommand.cxx
parent7d2de52c1a617a8a559e5c749ce5e6abd3739f01 (diff)
downloadcmake-9a1d4e92eb6347dbe6d03cc861e284f6a4da5a6a.tar.gz
BUG: Fix/cleanup custom commands and custom targets. Make empty comment strings work. Fix ZERO_CHECK target always out of date for debugging. Fix Makefile driving of custom commands in a custom target. Fix dependencies on custom targets not in ALL in VS generators.
Diffstat (limited to 'Source/cmCustomCommand.cxx')
-rw-r--r--Source/cmCustomCommand.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx
index 621f7caed2..e3fc69a425 100644
--- a/Source/cmCustomCommand.cxx
+++ b/Source/cmCustomCommand.cxx
@@ -19,6 +19,7 @@
//----------------------------------------------------------------------------
cmCustomCommand::cmCustomCommand()
{
+ this->HaveComment = false;
this->EscapeOldStyle = true;
this->EscapeAllowMakeVars = false;
this->Used = false;
@@ -29,6 +30,7 @@ cmCustomCommand::cmCustomCommand(const cmCustomCommand& r):
Outputs(r.Outputs),
Depends(r.Depends),
CommandLines(r.CommandLines),
+ HaveComment(r.HaveComment),
Comment(r.Comment),
WorkingDirectory(r.WorkingDirectory),
EscapeAllowMakeVars(r.EscapeAllowMakeVars),
@@ -41,13 +43,16 @@ cmCustomCommand::cmCustomCommand(const cmCustomCommand& r):
cmCustomCommand::cmCustomCommand(const std::vector<std::string>& outputs,
const std::vector<std::string>& depends,
const cmCustomCommandLines& commandLines,
- const char* comment,
+ const char* comment,
const char* workingDirectory):
Outputs(outputs),
Depends(depends),
CommandLines(commandLines),
+ HaveComment(comment?true:false),
Comment(comment?comment:""),
- WorkingDirectory(workingDirectory?workingDirectory:"")
+ WorkingDirectory(workingDirectory?workingDirectory:""),
+ EscapeAllowMakeVars(false),
+ EscapeOldStyle(true)
{
this->EscapeOldStyle = true;
this->EscapeAllowMakeVars = false;
@@ -85,7 +90,8 @@ const cmCustomCommandLines& cmCustomCommand::GetCommandLines() const
//----------------------------------------------------------------------------
const char* cmCustomCommand::GetComment() const
{
- return this->Comment.c_str();
+ const char* no_comment = 0;
+ return this->HaveComment? this->Comment.c_str() : no_comment;
}
//----------------------------------------------------------------------------