mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 06:09:14 -05:00
ENH: look for .com files before .exe
This commit is contained in:
@@ -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()))
|
||||
|
||||
Reference in New Issue
Block a user