瀏覽代碼

ENH: look for .com files before .exe

Bill Hoffman 24 年之前
父節點
當前提交
e179ddde12
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      Source/cmSystemTools.cxx

+ 8 - 0
Source/cmSystemTools.cxx

@@ -1105,6 +1105,14 @@ std::string cmSystemTools::FindProgram(const char* name,
       {
       return cmSystemTools::CollapseFullPath(tryPath.c_str());
       }
+#ifdef _WIN32
+    tryPath += ".com";
+    if(cmSystemTools::FileExists(tryPath.c_str()) &&
+       !cmSystemTools::FileIsDirectory(tryPath.c_str()))
+      {
+      return cmSystemTools::CollapseFullPath(tryPath.c_str());
+      }
+#endif
     tryPath += cmSystemTools::GetExecutableExtension();
     if(cmSystemTools::FileExists(tryPath.c_str()) &&
        !cmSystemTools::FileIsDirectory(tryPath.c_str()))