summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-05-27 14:22:03 (GMT)
committerBrad King <brad.king@kitware.com>2008-05-27 14:22:03 (GMT)
commit757875df9151eb02e252caa4e4f5ee6522f5a99f (patch)
tree38d67faa987944e17f25708e896300bd1aace132 /Source/cmFileCommand.cxx
parent852242e56b74520b3c4486f4d5aca54b42c42a77 (diff)
downloadCMake-757875df9151eb02e252caa4e4f5ee6522f5a99f.zip
CMake-757875df9151eb02e252caa4e4f5ee6522f5a99f.tar.gz
CMake-757875df9151eb02e252caa4e4f5ee6522f5a99f.tar.bz2
ENH: Inform user when RPATH is set during installation.
- Original patch from Alex. - Modified to print only when RPATH is actually set.
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx19
1 files changed, 16 insertions, 3 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index be2bf65..6ac6bcca 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -1411,7 +1411,8 @@ cmFileCommand::HandleRPathChangeCommand(std::vector<std::string> const& args)
cmSystemToolsFileTime* ft = cmSystemTools::FileTimeNew();
bool have_ft = cmSystemTools::FileTimeGet(file, ft);
std::string emsg;
- if(!cmSystemTools::ChangeRPath(file, oldRPath, newRPath, &emsg))
+ bool changed;
+ if(!cmSystemTools::ChangeRPath(file, oldRPath, newRPath, &emsg, &changed))
{
cmOStringStream e;
e << "RPATH_CHANGE could not write new RPATH:\n"
@@ -1422,9 +1423,21 @@ cmFileCommand::HandleRPathChangeCommand(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(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);
return success;