[Cmake-commits] [cmake-commits] king committed cmGlobalGenerator.cxx 1.231 1.232 cmGlobalGenerator.h 1.110 1.111 cmMakefileTargetGenerator.cxx 1.102 1.103

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Jun 3 09:55:32 EDT 2008


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

Modified Files:
	cmGlobalGenerator.cxx cmGlobalGenerator.h 
	cmMakefileTargetGenerator.cxx 
Log Message:
BUG: Include less content as input to "rule hash" computation.

  - The rule hash should use only commands specified by the user.
  - No make output (echo and progress) rules should be included.
  - No outputs or dependencies need be included.  The native build tool
    will take care of them.


Index: cmGlobalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v
retrieving revision 1.110
retrieving revision 1.111
diff -C 2 -d -r1.110 -r1.111
*** cmGlobalGenerator.h	2 Jun 2008 20:44:58 -0000	1.110
--- cmGlobalGenerator.h	3 Jun 2008 13:55:28 -0000	1.111
***************
*** 247,252 ****
  
    void AddRuleHash(const std::vector<std::string>& outputs,
!                    const std::vector<std::string>& depends,
!                    const std::vector<std::string>& commands);
  
  protected:
--- 247,252 ----
  
    void AddRuleHash(const std::vector<std::string>& outputs,
!                    std::vector<std::string>::const_iterator first,
!                    std::vector<std::string>::const_iterator last);
  
  protected:

Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.231
retrieving revision 1.232
diff -C 2 -d -r1.231 -r1.232
*** cmGlobalGenerator.cxx	2 Jun 2008 20:44:57 -0000	1.231
--- cmGlobalGenerator.cxx	3 Jun 2008 13:55:27 -0000	1.232
***************
*** 1944,1949 ****
  void
  cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs,
!                                const std::vector<std::string>& depends,
!                                const std::vector<std::string>& commands)
  {
  #if defined(CMAKE_BUILD_WITH_CMAKE)
--- 1944,1949 ----
  void
  cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs,
!                                std::vector<std::string>::const_iterator first,
!                                std::vector<std::string>::const_iterator last)
  {
  #if defined(CMAKE_BUILD_WITH_CMAKE)
***************
*** 1961,1980 ****
    cmsysMD5* sum = cmsysMD5_New();
    cmsysMD5_Initialize(sum);
!   for(std::vector<std::string>::const_iterator i = outputs.begin();
!       i != outputs.end(); ++i)
!     {
!     data = reinterpret_cast<unsigned char const*>(i->c_str());
!     length = static_cast<int>(i->length());
!     cmsysMD5_Append(sum, data, length);
!     }
!   for(std::vector<std::string>::const_iterator i = depends.begin();
!       i != depends.end(); ++i)
!     {
!     data = reinterpret_cast<unsigned char const*>(i->c_str());
!     length = static_cast<int>(i->length());
!     cmsysMD5_Append(sum, data, length);
!     }
!   for(std::vector<std::string>::const_iterator i = commands.begin();
!       i != commands.end(); ++i)
      {
      data = reinterpret_cast<unsigned char const*>(i->c_str());
--- 1961,1965 ----
    cmsysMD5* sum = cmsysMD5_New();
    cmsysMD5_Initialize(sum);
!   for(std::vector<std::string>::const_iterator i = first; i != last; ++i)
      {
      data = reinterpret_cast<unsigned char const*>(i->c_str());

Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.102
retrieving revision 1.103
diff -C 2 -d -r1.102 -r1.103
*** cmMakefileTargetGenerator.cxx	2 Jun 2008 20:44:58 -0000	1.102
--- cmMakefileTargetGenerator.cxx	3 Jun 2008 13:55:28 -0000	1.103
***************
*** 1117,1120 ****
--- 1117,1124 ----
                     cmLocalUnixMakefileGenerator3::EchoGenerate);
      }
+   // Below we need to skip over the echo and progress commands.
+   unsigned int skip = static_cast<unsigned int>(commands.size());
+ 
+   // Now append the actual user-specified commands.
    this->LocalGenerator->AppendCustomCommand(commands, cc);
  
***************
*** 1145,1149 ****
    if(!symbolic)
      {
!     this->GlobalGenerator->AddRuleHash(cc.GetOutputs(), depends, commands);
      }
    }
--- 1149,1155 ----
    if(!symbolic)
      {
!     this->GlobalGenerator->AddRuleHash(cc.GetOutputs(),
!                                        commands.begin()+skip,
!                                        commands.end());
      }
    }



More information about the Cmake-commits mailing list