summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-06-02 20:45:07 (GMT)
committerBrad King <brad.king@kitware.com>2008-06-02 20:45:07 (GMT)
commitbed3ac8741405132096430c9f61578df9f8cfbf9 (patch)
treeb140448aa518e2d4e20349cf5c72ce8e412a6977 /Source
parent6be09c366774ed6d723a06f5f07ba5c09d8e4579 (diff)
downloadCMake-bed3ac8741405132096430c9f61578df9f8cfbf9.zip
CMake-bed3ac8741405132096430c9f61578df9f8cfbf9.tar.gz
CMake-bed3ac8741405132096430c9f61578df9f8cfbf9.tar.bz2
ENH: Remove SKIP_RULE_DEPENDS option from add_custom_command()
- Option was recently added but never released. - Custom commands no longer depend on build.make so we do not need the option. - Rule hashes now take care of rebuilding when rules change so the dependency is not needed.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmAddCustomCommandCommand.cxx21
-rw-r--r--Source/cmAddCustomCommandCommand.h8
-rw-r--r--Source/cmCustomCommand.cxx18
-rw-r--r--Source/cmCustomCommand.h5
4 files changed, 7 insertions, 45 deletions
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index afbdc70..5912a79 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -40,7 +40,6 @@ bool cmAddCustomCommandCommand
std::vector<std::string> depends, outputs, output;
bool verbatim = false;
bool append = false;
- bool skip_rule_depends = false;
std::string implicit_depends_lang;
cmCustomCommand::ImplicitDependsList implicit_depends;
@@ -104,11 +103,6 @@ bool cmAddCustomCommandCommand
{
verbatim = true;
}
- else if(copy == "SKIP_RULE_DEPENDS")
- {
- doing = doing_nothing;
- skip_rule_depends = true;
- }
else if(copy == "APPEND")
{
append = true;
@@ -316,8 +310,8 @@ bool cmAddCustomCommandCommand
working.c_str(), false,
escapeOldStyle);
- // Get the rule object to add some extra information.
- if(!implicit_depends.empty() || skip_rule_depends)
+ // Add implicit dependency scanning requests if any were given.
+ if(!implicit_depends.empty())
{
bool okay = false;
if(cmSourceFile* sf =
@@ -326,16 +320,7 @@ bool cmAddCustomCommandCommand
if(cmCustomCommand* cc = sf->GetCustomCommand())
{
okay = true;
-
- // Add implicit dependency scanning requests if any were
- // given.
- if(!implicit_depends.empty())
- {
- cc->SetImplicitDepends(implicit_depends);
- }
-
- // Set the rule dependency state.
- cc->SetSkipRuleDepends(skip_rule_depends);
+ cc->SetImplicitDepends(implicit_depends);
}
}
if(!okay)
diff --git a/Source/cmAddCustomCommandCommand.h b/Source/cmAddCustomCommandCommand.h
index b58a398..7829b61 100644
--- a/Source/cmAddCustomCommandCommand.h
+++ b/Source/cmAddCustomCommandCommand.h
@@ -71,7 +71,7 @@ public:
" COMMAND command1 [ARGS] [args1...]\n"
" [COMMAND command2 [ARGS] [args2...] ...]\n"
" [MAIN_DEPENDENCY depend]\n"
- " [DEPENDS [depends...]] [SKIP_RULE_DEPENDS]\n"
+ " [DEPENDS [depends...]]\n"
" [IMPLICIT_DEPENDS <lang1> depend1 ...]\n"
" [WORKING_DIRECTORY dir]\n"
" [COMMENT comment] [VERBATIM] [APPEND])\n"
@@ -134,12 +134,6 @@ public:
"created as a file on disk it should be marked as SYMBOLIC with "
"SET_SOURCE_FILES_PROPERTIES.\n"
- "The SKIP_RULE_DEPENDS option prevents the custom build rule from "
- "having a dependency on itself. This prevents the rule from running "
- "again just because the command changed but is useful to create "
- "rules that have absolutely no dependencies. Such rules run only "
- "when the output file is missing.\n"
-
"The IMPLICIT_DEPENDS option requests scanning of implicit "
"dependencies of an input file. The language given specifies the "
"programming language whose corresponding dependency scanner should "
diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx
index b2f5c87..60896b1 100644
--- a/Source/cmCustomCommand.cxx
+++ b/Source/cmCustomCommand.cxx
@@ -22,7 +22,6 @@ cmCustomCommand::cmCustomCommand()
this->HaveComment = false;
this->EscapeOldStyle = true;
this->EscapeAllowMakeVars = false;
- this->SkipRuleDepends = false;
}
//----------------------------------------------------------------------------
@@ -51,9 +50,10 @@ cmCustomCommand::cmCustomCommand(const std::vector<std::string>& outputs,
Comment(comment?comment:""),
WorkingDirectory(workingDirectory?workingDirectory:""),
EscapeAllowMakeVars(false),
- EscapeOldStyle(true),
- SkipRuleDepends(false)
+ EscapeOldStyle(true)
{
+ this->EscapeOldStyle = true;
+ this->EscapeAllowMakeVars = false;
}
//----------------------------------------------------------------------------
@@ -136,18 +136,6 @@ 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
{
diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h
index c6ad772..70319e5 100644
--- a/Source/cmCustomCommand.h
+++ b/Source/cmCustomCommand.h
@@ -68,10 +68,6 @@ public:
bool GetEscapeAllowMakeVars() const;
void SetEscapeAllowMakeVars(bool b);
- /** Set/Get whether to skip the dependency on the rule itself. */
- bool GetSkipRuleDepends() const;
- void SetSkipRuleDepends(bool b);
-
typedef std::pair<cmStdString, cmStdString> ImplicitDependsPair;
class ImplicitDependsList: public std::vector<ImplicitDependsPair> {};
void SetImplicitDepends(ImplicitDependsList const&);
@@ -87,7 +83,6 @@ private:
std::string WorkingDirectory;
bool EscapeAllowMakeVars;
bool EscapeOldStyle;
- bool SkipRuleDepends;
ImplicitDependsList ImplicitDepends;
};