summaryrefslogtreecommitdiffstats
path: root/Source/cmCustomCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-05-14 15:38:47 (GMT)
committerBrad King <brad.king@kitware.com>2008-05-14 15:38:47 (GMT)
commit600e5e274ea5e78989c9355685e97d6f4d6f28ec (patch)
treed101d1d699fbbdb3a2e36a581228cd0c56d2b72a /Source/cmCustomCommand.cxx
parent3fb5602e547b4ae23ae9bdcc36be09bbc5f6fbea (diff)
downloadCMake-600e5e274ea5e78989c9355685e97d6f4d6f28ec.zip
CMake-600e5e274ea5e78989c9355685e97d6f4d6f28ec.tar.gz
CMake-600e5e274ea5e78989c9355685e97d6f4d6f28ec.tar.bz2
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.
Diffstat (limited to 'Source/cmCustomCommand.cxx')
-rw-r--r--Source/cmCustomCommand.cxx18
1 files changed, 15 insertions, 3 deletions
diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx
index 60896b1..b2f5c87 100644
--- a/Source/cmCustomCommand.cxx
+++ b/Source/cmCustomCommand.cxx
@@ -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;
}
//----------------------------------------------------------------------------
@@ -136,6 +136,18 @@ void cmCustomCommand::SetEscapeAllowMakeVars(bool b)
}
//----------------------------------------------------------------------------
+bool cmCustomCommand::GetSkipRuleDepends() const
+{
+ return this->SkipRuleDepends;
+}
+
+//----------------------------------------------------------------------------
+void cmCustomCommand::SetSkipRuleDepends(bool b)
+{
+ this->SkipRuleDepends = b;
+}
+
+//----------------------------------------------------------------------------
cmCustomCommand::ImplicitDependsList const&
cmCustomCommand::GetImplicitDepends() const
{