瀏覽代碼

BUG: Fix cmSystemTools::ChangeRPath to not complain if there is no RPATH entry in the file but the requested new rpath is empty.

Brad King 17 年之前
父節點
當前提交
26e58b74d1
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      Source/cmSystemTools.cxx

+ 6 - 0
Source/cmSystemTools.cxx

@@ -2211,6 +2211,12 @@ bool cmSystemTools::ChangeRPath(std::string const& file,
     rpathPosition = se->Position;
     rpathPosition = se->Position;
     rpathSize = se->Size;
     rpathSize = se->Size;
     }
     }
+  else if(newRPath.empty())
+    {
+    // The new rpath is empty and there is no rpath anyway so it is
+    // okay.
+    return true;
+    }
   else
   else
     {
     {
     if(emsg)
     if(emsg)