ENH: look for .com files before .exe

This commit is contained in:
Bill Hoffman 2002-02-28 10:41:27 -05:00
parent c133a6acfa
commit e179ddde12
1 changed files with 8 additions and 0 deletions

View File

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