[Cmake-commits] [cmake-commits] king committed cmLocalUnixMakefileGenerator3.cxx 1.258 1.259 cmLocalUnixMakefileGenerator3.h 1.86 1.87 cmMakefileExecutableTargetGenerator.cxx 1.52 1.53 cmMakefileLibraryTargetGenerator.cxx 1.67 1.68 cmMakefileTargetGenerator.cxx 1.112 1.113 cmMakefileUtilityTargetGenerator.cxx 1.8 1.9

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Feb 10 08:50:36 EST 2009


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

Modified Files:
	cmLocalUnixMakefileGenerator3.cxx 
	cmLocalUnixMakefileGenerator3.h 
	cmMakefileExecutableTargetGenerator.cxx 
	cmMakefileLibraryTargetGenerator.cxx 
	cmMakefileTargetGenerator.cxx 
	cmMakefileUtilityTargetGenerator.cxx 
Log Message:
ENH: Give target in which custom commands build

This gives the cmTarget instance for which custom command rules are
being generated to cmLocalUnixMakefileGenerator3::AppendCustomCommands.
It will be useful in the future.


Index: cmLocalUnixMakefileGenerator3.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.h,v
retrieving revision 1.86
retrieving revision 1.87
diff -C 2 -d -r1.86 -r1.87
*** cmLocalUnixMakefileGenerator3.h	9 Feb 2009 21:36:56 -0000	1.86
--- cmLocalUnixMakefileGenerator3.h	10 Feb 2009 13:50:33 -0000	1.87
***************
*** 327,334 ****
--- 327,336 ----
    void AppendCustomCommands(std::vector<std::string>& commands,
                              const std::vector<cmCustomCommand>& ccs,
+                             cmTarget* target,
                              cmLocalGenerator::RelativeRoot relative =
                              cmLocalGenerator::HOME_OUTPUT);
    void AppendCustomCommand(std::vector<std::string>& commands,
                             const cmCustomCommand& cc,
+                            cmTarget* target,
                             bool echo_comment=false,
                             cmLocalGenerator::RelativeRoot relative =

Index: cmMakefileUtilityTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileUtilityTargetGenerator.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -C 2 -d -r1.8 -r1.9
*** cmMakefileUtilityTargetGenerator.cxx	18 Feb 2008 21:38:34 -0000	1.8
--- cmMakefileUtilityTargetGenerator.cxx	10 Feb 2009 13:50:33 -0000	1.9
***************
*** 55,59 ****
  
    this->LocalGenerator->AppendCustomCommands
!     (commands, this->Target->GetPreBuildCommands());
  
    // Depend on all custom command outputs for sources
--- 55,59 ----
  
    this->LocalGenerator->AppendCustomCommands
!     (commands, this->Target->GetPreBuildCommands(), this->Target);
  
    // Depend on all custom command outputs for sources
***************
*** 61,65 ****
  
    this->LocalGenerator->AppendCustomCommands
!     (commands, this->Target->GetPostBuildCommands());
  
    // Add dependencies on targets that must be built first.
--- 61,65 ----
  
    this->LocalGenerator->AppendCustomCommands
!     (commands, this->Target->GetPostBuildCommands(), this->Target);
  
    // Add dependencies on targets that must be built first.

Index: cmMakefileLibraryTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.cxx,v
retrieving revision 1.67
retrieving revision 1.68
diff -C 2 -d -r1.67 -r1.68
*** cmMakefileLibraryTargetGenerator.cxx	15 Oct 2008 14:21:14 -0000	1.67
--- cmMakefileLibraryTargetGenerator.cxx	10 Feb 2009 13:50:33 -0000	1.68
***************
*** 601,607 ****
      {
      this->LocalGenerator
!       ->AppendCustomCommands(commands, this->Target->GetPreBuildCommands());
      this->LocalGenerator
!       ->AppendCustomCommands(commands, this->Target->GetPreLinkCommands());
      }
  
--- 601,609 ----
      {
      this->LocalGenerator
!       ->AppendCustomCommands(commands, this->Target->GetPreBuildCommands(),
!                              this->Target);
      this->LocalGenerator
!       ->AppendCustomCommands(commands, this->Target->GetPreLinkCommands(),
!                              this->Target);
      }
  
***************
*** 868,872 ****
      {
      this->LocalGenerator->
!       AppendCustomCommands(commands, this->Target->GetPostBuildCommands());
      }
  
--- 870,875 ----
      {
      this->LocalGenerator->
!       AppendCustomCommands(commands, this->Target->GetPostBuildCommands(),
!                            this->Target);
      }
  

Index: cmMakefileExecutableTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileExecutableTargetGenerator.cxx,v
retrieving revision 1.52
retrieving revision 1.53
diff -C 2 -d -r1.52 -r1.53
*** cmMakefileExecutableTargetGenerator.cxx	6 Feb 2009 14:03:27 -0000	1.52
--- cmMakefileExecutableTargetGenerator.cxx	10 Feb 2009 13:50:33 -0000	1.53
***************
*** 300,306 ****
      {
      this->LocalGenerator
!       ->AppendCustomCommands(commands, this->Target->GetPreBuildCommands());
      this->LocalGenerator
!       ->AppendCustomCommands(commands, this->Target->GetPreLinkCommands());
      }
  
--- 300,308 ----
      {
      this->LocalGenerator
!       ->AppendCustomCommands(commands, this->Target->GetPreBuildCommands(),
!                              this->Target);
      this->LocalGenerator
!       ->AppendCustomCommands(commands, this->Target->GetPreLinkCommands(),
!                              this->Target);
      }
  
***************
*** 437,441 ****
      {
      this->LocalGenerator->
!       AppendCustomCommands(commands, this->Target->GetPostBuildCommands());
      }
  
--- 439,444 ----
      {
      this->LocalGenerator->
!       AppendCustomCommands(commands, this->Target->GetPostBuildCommands(),
!                            this->Target);
      }
  

Index: cmLocalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.cxx,v
retrieving revision 1.258
retrieving revision 1.259
diff -C 2 -d -r1.258 -r1.259
*** cmLocalUnixMakefileGenerator3.cxx	9 Feb 2009 21:36:56 -0000	1.258
--- cmLocalUnixMakefileGenerator3.cxx	10 Feb 2009 13:50:32 -0000	1.259
***************
*** 955,958 ****
--- 955,959 ----
  ::AppendCustomCommands(std::vector<std::string>& commands,
                         const std::vector<cmCustomCommand>& ccs,
+                        cmTarget* target,
                         cmLocalGenerator::RelativeRoot relative)
  {
***************
*** 960,964 ****
        i != ccs.end(); ++i)
      {
!     this->AppendCustomCommand(commands, *i, true, relative);
      }
  }
--- 961,965 ----
        i != ccs.end(); ++i)
      {
!     this->AppendCustomCommand(commands, *i, target, true, relative);
      }
  }
***************
*** 968,975 ****
  cmLocalUnixMakefileGenerator3
  ::AppendCustomCommand(std::vector<std::string>& commands,
!                       const cmCustomCommand& cc, bool echo_comment,
                        cmLocalGenerator::RelativeRoot relative,
                        std::ostream* content)
  {
    // Optionally create a command to display the custom command's
    // comment text.  This is used for pre-build, pre-link, and
--- 969,979 ----
  cmLocalUnixMakefileGenerator3
  ::AppendCustomCommand(std::vector<std::string>& commands,
!                       const cmCustomCommand& cc,
!                       cmTarget* target,
!                       bool echo_comment,
                        cmLocalGenerator::RelativeRoot relative,
                        std::ostream* content)
  {
+   static_cast<void>(target); // Future use
    // Optionally create a command to display the custom command's
    // comment text.  This is used for pre-build, pre-link, and
***************
*** 1622,1628 ****
--- 1626,1634 ----
        this->AppendCustomCommands(commands, 
                                   glIt->second.GetPreBuildCommands(),
+                                  &glIt->second,
                                   cmLocalGenerator::START_OUTPUT);
        this->AppendCustomCommands(commands, 
                                   glIt->second.GetPostBuildCommands(),
+                                  &glIt->second,
                                   cmLocalGenerator::START_OUTPUT);
        std::string targetName = glIt->second.GetName();

Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.112
retrieving revision 1.113
diff -C 2 -d -r1.112 -r1.113
*** cmMakefileTargetGenerator.cxx	2 Feb 2009 19:36:53 -0000	1.112
--- cmMakefileTargetGenerator.cxx	10 Feb 2009 13:50:33 -0000	1.113
***************
*** 1126,1130 ****
    // Now append the actual user-specified commands.
    cmOStringStream content;
!   this->LocalGenerator->AppendCustomCommand(commands, cc, false,
                                              cmLocalGenerator::HOME_OUTPUT,
                                              &content);
--- 1126,1130 ----
    // Now append the actual user-specified commands.
    cmOStringStream content;
!   this->LocalGenerator->AppendCustomCommand(commands, cc, this->Target, false,
                                              cmLocalGenerator::HOME_OUTPUT,
                                              &content);



More information about the Cmake-commits mailing list