瀏覽代碼

ENH: fix for bug 28618, cmake.exe can not find itself

Bill Hoffman 20 年之前
父節點
當前提交
d2621064e2
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      Source/kwsys/SystemTools.cxx

+ 4 - 1
Source/kwsys/SystemTools.cxx

@@ -1950,9 +1950,12 @@ kwsys_stl::string SystemTools::FindProgram(
     {
     path.push_back(*i);
     }
-  for(kwsys_stl::vector<kwsys_stl::string>::const_iterator p = path.begin();
+  for(kwsys_stl::vector<kwsys_stl::string>::iterator p = path.begin();
       p != path.end(); ++p)
     {
+#ifdef _WIN32
+    SystemTools::ReplaceString(*p, "\"", "");
+#endif
     tryPath = *p;
     tryPath += "/";
     tryPath += name;