Bläddra i källkod

ENH: look for .com files before .exe

Bill Hoffman 24 år sedan
förälder
incheckning
e179ddde12
1 ändrade filer med 8 tillägg och 0 borttagningar
  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()))