ENH: Add SKIP_RULE_DEPENDS option for add_custom_command()

- Allows make rules to be created with no dependencies.
  - Such rules will not re-run even if the commands themselves change.
  - Useful to create rules that run only if the output is missing.
This commit is contained in:
Brad King
2008-05-14 11:38:47 -04:00
parent 3fb5602e54
commit 600e5e274e
8 changed files with 61 additions and 10 deletions
+15 -3
View File
@@ -22,6 +22,7 @@ cmCustomCommand::cmCustomCommand()
this->HaveComment = false;
this->EscapeOldStyle = true;
this->EscapeAllowMakeVars = false;
this->SkipRuleDepends = false;
}
//----------------------------------------------------------------------------
@@ -50,10 +51,9 @@ cmCustomCommand::cmCustomCommand(const std::vector<std::string>& outputs,
Comment(comment?comment:""),
WorkingDirectory(workingDirectory?workingDirectory:""),
EscapeAllowMakeVars(false),
EscapeOldStyle(true)
EscapeOldStyle(true),
SkipRuleDepends(false)
{
this->EscapeOldStyle = true;
this->EscapeAllowMakeVars = false;
}
//----------------------------------------------------------------------------
@@ -135,6 +135,18 @@ void cmCustomCommand::SetEscapeAllowMakeVars(bool b)
this->EscapeAllowMakeVars = b;
}
//----------------------------------------------------------------------------
bool cmCustomCommand::GetSkipRuleDepends() const
{
return this->SkipRuleDepends;
}
//----------------------------------------------------------------------------
void cmCustomCommand::SetSkipRuleDepends(bool b)
{
this->SkipRuleDepends = b;
}
//----------------------------------------------------------------------------
cmCustomCommand::ImplicitDependsList const&
cmCustomCommand::GetImplicitDepends() const