diff options
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 19 |
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; |