Преглед изворни кода

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()))