[Cmake-commits] [cmake-commits] king committed cmFileCommand.cxx 1.109 1.110 cmSystemTools.cxx 1.377 1.378 cmSystemTools.h 1.152 1.153
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue May 27 10:22:05 EDT 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv31426/Source
Modified Files:
cmFileCommand.cxx cmSystemTools.cxx cmSystemTools.h
Log Message:
ENH: Inform user when RPATH is set during installation.
- Original patch from Alex.
- Modified to print only when RPATH is actually set.
Index: cmSystemTools.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.h,v
retrieving revision 1.152
retrieving revision 1.153
diff -C 2 -d -r1.152 -r1.153
*** cmSystemTools.h 14 Apr 2008 19:02:34 -0000 1.152
--- cmSystemTools.h 27 May 2008 14:22:03 -0000 1.153
***************
*** 392,396 ****
std::string const& oldRPath,
std::string const& newRPath,
! std::string* emsg = 0);
/** Try to remove the RPATH from an ELF binary. */
--- 392,397 ----
std::string const& oldRPath,
std::string const& newRPath,
! std::string* emsg = 0,
! bool* changed = 0);
/** Try to remove the RPATH from an ELF binary. */
Index: cmSystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v
retrieving revision 1.377
retrieving revision 1.378
diff -C 2 -d -r1.377 -r1.378
*** cmSystemTools.cxx 14 Apr 2008 19:02:33 -0000 1.377
--- cmSystemTools.cxx 27 May 2008 14:22:02 -0000 1.378
***************
*** 2333,2339 ****
std::string const& oldRPath,
std::string const& newRPath,
! std::string* emsg)
{
#if defined(CMAKE_USE_ELF_PARSER)
unsigned long rpathPosition = 0;
unsigned long rpathSize = 0;
--- 2333,2344 ----
std::string const& oldRPath,
std::string const& newRPath,
! std::string* emsg,
! bool* changed)
{
#if defined(CMAKE_USE_ELF_PARSER)
+ if(changed)
+ {
+ *changed = false;
+ }
unsigned long rpathPosition = 0;
unsigned long rpathSize = 0;
***************
*** 2446,2449 ****
--- 2451,2458 ----
if(f)
{
+ if(changed)
+ {
+ *changed = true;
+ }
return true;
}
***************
*** 2461,2464 ****
--- 2470,2474 ----
(void)newRPath;
(void)emsg;
+ (void)changed;
return false;
#endif
Index: cmFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFileCommand.cxx,v
retrieving revision 1.109
retrieving revision 1.110
diff -C 2 -d -r1.109 -r1.110
*** cmFileCommand.cxx 17 May 2008 15:42:11 -0000 1.109
--- cmFileCommand.cxx 27 May 2008 14:22:02 -0000 1.110
***************
*** 1412,1416 ****
bool have_ft = cmSystemTools::FileTimeGet(file, ft);
std::string emsg;
! if(!cmSystemTools::ChangeRPath(file, oldRPath, newRPath, &emsg))
{
cmOStringStream e;
--- 1412,1417 ----
bool have_ft = cmSystemTools::FileTimeGet(file, ft);
std::string emsg;
! bool changed;
! if(!cmSystemTools::ChangeRPath(file, oldRPath, newRPath, &emsg, &changed))
{
cmOStringStream e;
***************
*** 1423,1429 ****
success = false;
}
! if(success && have_ft)
{
! cmSystemTools::FileTimeSet(file, ft);
}
cmSystemTools::FileTimeDelete(ft);
--- 1424,1442 ----
success = false;
}
! if(success)
{
! if(changed)
! {
! std::string message = "Set runtime path of \"";
! message += file;
! message += "\" to \"";
! message += newRPath;
! 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