mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 14:48:19 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user