소스 검색

ENH: Improve error message when installation file(CHRPATH) cannot change the RPATH.

Brad King 18 년 전
부모
커밋
c408760a8a
2개의 변경된 파일11개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 2
      Source/cmFileCommand.cxx
  2. 7 1
      Source/cmSystemTools.cxx

+ 4 - 2
Source/cmFileCommand.cxx

@@ -1407,8 +1407,10 @@ bool cmFileCommand::HandleChrpathCommand(std::vector<std::string> 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;

+ 7 - 1
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;
       }