From c408760a8a8d2e8c65f231c399b4ed2e6d2087da Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 7 Apr 2008 10:55:52 -0400 Subject: [PATCH] ENH: Improve error message when installation file(CHRPATH) cannot change the RPATH. --- Source/cmFileCommand.cxx | 6 ++++-- Source/cmSystemTools.cxx | 8 +++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 4aa04e3ef..68ccbb28f 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -1407,8 +1407,10 @@ bool cmFileCommand::HandleChrpathCommand(std::vector const& args) else { cmOStringStream e; - e << "CHRPATH could not write new RPATH \"" - << newRPath << "\" to the file \"" << file << "\": " + e << "CHRPATH could not write new RPATH:\n" + << " " << newRPath << "\n" + << "to the file:\n" + << " " << file << "\n" << emsg; this->SetError(e.str().c_str()); return false; diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 32c77970d..26b2b580c 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2229,7 +2229,13 @@ bool cmSystemTools::ChangeRPath(std::string const& file, } if(emsg) { - *emsg = "The current RPATH does not begin with that specified."; + cmOStringStream e; + e << "The current RPATH is:\n" + << " " << se->Value << "\n" + << "which does not begin with:\n" + << " " << oldRPath << "\n" + << "as was expected."; + *emsg = e.str(); } return false; }