[Cmake-commits] [cmake-commits] king committed cmAddCustomCommandCommand.cxx 1.38 1.39 cmAddCustomCommandCommand.h 1.34 1.35 cmCustomCommand.cxx 1.25 1.26 cmCustomCommand.h 1.24 1.25

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Jun 2 16:45:09 EDT 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv1349/Source

Modified Files:
	cmAddCustomCommandCommand.cxx cmAddCustomCommandCommand.h 
	cmCustomCommand.cxx cmCustomCommand.h 
Log Message:
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.


Index: cmAddCustomCommandCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmAddCustomCommandCommand.cxx,v
retrieving revision 1.38
retrieving revision 1.39
diff -C 2 -d -r1.38 -r1.39
*** cmAddCustomCommandCommand.cxx	14 May 2008 15:38:46 -0000	1.38
--- cmAddCustomCommandCommand.cxx	2 Jun 2008 20:45:06 -0000	1.39
***************
*** 41,45 ****
    bool verbatim = false;
    bool append = false;
-   bool skip_rule_depends = false;
    std::string implicit_depends_lang;
    cmCustomCommand::ImplicitDependsList implicit_depends;
--- 41,44 ----
***************
*** 105,113 ****
        verbatim = true;
        }
-     else if(copy == "SKIP_RULE_DEPENDS")
-       {
-       doing = doing_nothing;
-       skip_rule_depends = true;
-       }
      else if(copy == "APPEND")
        {
--- 104,107 ----
***************
*** 317,322 ****
                                               escapeOldStyle);
  
!     // Get the rule object to add some extra information.
!     if(!implicit_depends.empty() || skip_rule_depends)
        {
        bool okay = false;
--- 311,316 ----
                                               escapeOldStyle);
  
!     // Add implicit dependency scanning requests if any were given.
!     if(!implicit_depends.empty())
        {
        bool okay = false;
***************
*** 327,340 ****
            {
            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);
            }
          }
--- 321,325 ----
            {
            okay = true;
!           cc->SetImplicitDepends(implicit_depends);
            }
          }

Index: cmAddCustomCommandCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmAddCustomCommandCommand.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -C 2 -d -r1.34 -r1.35
*** cmAddCustomCommandCommand.h	14 May 2008 15:38:46 -0000	1.34
--- cmAddCustomCommandCommand.h	2 Jun 2008 20:45:06 -0000	1.35
***************
*** 72,76 ****
        "                     [COMMAND command2 [ARGS] [args2...] ...]\n"
        "                     [MAIN_DEPENDENCY depend]\n"
!       "                     [DEPENDS [depends...]] [SKIP_RULE_DEPENDS]\n"
        "                     [IMPLICIT_DEPENDS <lang1> depend1 ...]\n"
        "                     [WORKING_DIRECTORY dir]\n"
--- 72,76 ----
        "                     [COMMAND command2 [ARGS] [args2...] ...]\n"
        "                     [MAIN_DEPENDENCY depend]\n"
!       "                     [DEPENDS [depends...]]\n"
        "                     [IMPLICIT_DEPENDS <lang1> depend1 ...]\n"
        "                     [WORKING_DIRECTORY dir]\n"
***************
*** 135,144 ****
        "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 "
--- 135,138 ----

Index: cmCustomCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCustomCommand.cxx,v
retrieving revision 1.25
retrieving revision 1.26
diff -C 2 -d -r1.25 -r1.26
*** cmCustomCommand.cxx	14 May 2008 15:38:46 -0000	1.25
--- cmCustomCommand.cxx	2 Jun 2008 20:45:06 -0000	1.26
***************
*** 23,27 ****
    this->EscapeOldStyle = true;
    this->EscapeAllowMakeVars = false;
-   this->SkipRuleDepends = false;
  }
  
--- 23,26 ----
***************
*** 52,58 ****
    WorkingDirectory(workingDirectory?workingDirectory:""),
    EscapeAllowMakeVars(false),
!   EscapeOldStyle(true),
!   SkipRuleDepends(false)
  {
  }
  
--- 51,58 ----
    WorkingDirectory(workingDirectory?workingDirectory:""),
    EscapeAllowMakeVars(false),
!   EscapeOldStyle(true)
  {
+   this->EscapeOldStyle = true;
+   this->EscapeAllowMakeVars = false;
  }
  
***************
*** 137,152 ****
  
  //----------------------------------------------------------------------------
- bool cmCustomCommand::GetSkipRuleDepends() const
- {
-   return this->SkipRuleDepends;
- }
- 
- //----------------------------------------------------------------------------
- void cmCustomCommand::SetSkipRuleDepends(bool b)
- {
-   this->SkipRuleDepends = b;
- }
- 
- //----------------------------------------------------------------------------
  cmCustomCommand::ImplicitDependsList const&
  cmCustomCommand::GetImplicitDepends() const
--- 137,140 ----

Index: cmCustomCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCustomCommand.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -C 2 -d -r1.24 -r1.25
*** cmCustomCommand.h	14 May 2008 15:38:46 -0000	1.24
--- cmCustomCommand.h	2 Jun 2008 20:45:06 -0000	1.25
***************
*** 69,76 ****
    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> {};
--- 69,72 ----
***************
*** 88,92 ****
    bool EscapeAllowMakeVars;
    bool EscapeOldStyle;
-   bool SkipRuleDepends;
    ImplicitDependsList ImplicitDepends;
  };
--- 84,87 ----



More information about the Cmake-commits mailing list