summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-08-14 13:53:26 (GMT)
committerBrad King <brad.king@kitware.com>2008-08-14 13:53:26 (GMT)
commit8063dd293e6f9c25dcfa964989138d4f5bb135ac (patch)
treeed2cceb2c50738e2332ace43306b33948380f4f8 /Source/cmFileCommand.cxx
parent485c3faea7cdae0086b1ea3d9eda4b49e595a584 (diff)
downloadCMake-8063dd293e6f9c25dcfa964989138d4f5bb135ac.zip
CMake-8063dd293e6f9c25dcfa964989138d4f5bb135ac.tar.gz
CMake-8063dd293e6f9c25dcfa964989138d4f5bb135ac.tar.bz2
ENH: Inform user when RPATH or RUNPATH is removed
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx17
1 files changed, 14 insertions, 3 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 6ac6bcca..e8e64a4 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -1486,7 +1486,8 @@ cmFileCommand::HandleRPathRemoveCommand(std::vector<std::string> const& args)
cmSystemToolsFileTime* ft = cmSystemTools::FileTimeNew();
bool have_ft = cmSystemTools::FileTimeGet(file, ft);
std::string emsg;
- if(!cmSystemTools::RemoveRPath(file, &emsg))
+ bool removed;
+ if(!cmSystemTools::RemoveRPath(file, &emsg, &removed))
{
cmOStringStream e;
e << "RPATH_REMOVE could not remove RPATH from file:\n"
@@ -1495,9 +1496,19 @@ cmFileCommand::HandleRPathRemoveCommand(std::vector<std::string> const& args)
this->SetError(e.str().c_str());
success = false;
}
- if(success && have_ft)
+ if(success)
{
- cmSystemTools::FileTimeSet(file, ft);
+ 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);
return success;