[Cmake-commits] [cmake-commits] king committed cmFileCommand.cxx 1.110 1.111 cmSystemTools.cxx 1.381 1.382 cmSystemTools.h 1.154 1.155

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Aug 14 09:53:28 EDT 2008


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

Modified Files:
	cmFileCommand.cxx cmSystemTools.cxx cmSystemTools.h 
Log Message:
ENH: Inform user when RPATH or RUNPATH is removed


Index: cmSystemTools.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.h,v
retrieving revision 1.154
retrieving revision 1.155
diff -C 2 -d -r1.154 -r1.155
*** cmSystemTools.h	27 May 2008 18:47:00 -0000	1.154
--- cmSystemTools.h	14 Aug 2008 13:53:26 -0000	1.155
***************
*** 397,401 ****
  
    /** Try to remove the RPATH from an ELF binary.  */
!   static bool RemoveRPath(std::string const& file, std::string* emsg = 0);
  
    /** Check whether the RPATH in an ELF binary contains the path
--- 397,402 ----
  
    /** Try to remove the RPATH from an ELF binary.  */
!   static bool RemoveRPath(std::string const& file, std::string* emsg = 0,
!                           bool* removed = 0);
  
    /** Check whether the RPATH in an ELF binary contains the path

Index: cmSystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v
retrieving revision 1.381
retrieving revision 1.382
diff -C 2 -d -r1.381 -r1.382
*** cmSystemTools.cxx	14 Aug 2008 13:53:21 -0000	1.381
--- cmSystemTools.cxx	14 Aug 2008 13:53:26 -0000	1.382
***************
*** 2526,2532 ****
  
  //----------------------------------------------------------------------------
! bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg)
  {
  #if defined(CMAKE_USE_ELF_PARSER)
    int zeroCount = 0;
    unsigned long zeroPosition[2] = {0,0};
--- 2526,2537 ----
  
  //----------------------------------------------------------------------------
! bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg,
!                                 bool* removed)
  {
  #if defined(CMAKE_USE_ELF_PARSER)
+   if(removed)
+     {
+     *removed = false;
+     }
    int zeroCount = 0;
    unsigned long zeroPosition[2] = {0,0};
***************
*** 2677,2684 ****
--- 2682,2694 ----
  
    // Everything was updated successfully.
+   if(removed)
+     {
+     *removed = true;
+     }
    return true;
  #else
    (void)file;
    (void)emsg;
+   (void)removed;
    return false;
  #endif

Index: cmFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFileCommand.cxx,v
retrieving revision 1.110
retrieving revision 1.111
diff -C 2 -d -r1.110 -r1.111
*** cmFileCommand.cxx	27 May 2008 14:22:02 -0000	1.110
--- cmFileCommand.cxx	14 Aug 2008 13:53:26 -0000	1.111
***************
*** 1487,1491 ****
    bool have_ft = cmSystemTools::FileTimeGet(file, ft);
    std::string emsg;
!   if(!cmSystemTools::RemoveRPath(file, &emsg))
      {
      cmOStringStream e;
--- 1487,1492 ----
    bool have_ft = cmSystemTools::FileTimeGet(file, ft);
    std::string emsg;
!   bool removed;
!   if(!cmSystemTools::RemoveRPath(file, &emsg, &removed))
      {
      cmOStringStream e;
***************
*** 1496,1502 ****
      success = false;
      }
!   if(success && have_ft)
      {
!     cmSystemTools::FileTimeSet(file, ft);
      }
    cmSystemTools::FileTimeDelete(ft);
--- 1497,1513 ----
      success = false;
      }
!   if(success)
      {
!     if(removed)
!       {
!       std::string message = "Removed runtime path from \"";
!       message += file;
!       message += "\"";
!       this->Makefile->DisplayStatus(message.c_str(), -1);
!       }
!     if(have_ft)
!       {
!       cmSystemTools::FileTimeSet(file, ft);
!       }
      }
    cmSystemTools::FileTimeDelete(ft);



More information about the Cmake-commits mailing list