summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-02-28 15:41:27 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-02-28 15:41:27 (GMT)
commite179ddde125a6f3ef324fb5f93162730aa628e20 (patch)
treee08f718fde66d6f1cb3f89eafc6c952f01f78e38 /Source
parentc133a6acfa2e8fe141076bb0f4c3441d8cc082ad (diff)
downloadCMake-e179ddde125a6f3ef324fb5f93162730aa628e20.zip
CMake-e179ddde125a6f3ef324fb5f93162730aa628e20.tar.gz
CMake-e179ddde125a6f3ef324fb5f93162730aa628e20.tar.bz2
ENH: look for .com files before .exe
Diffstat (limited to 'Source')
-rw-r--r--Source/cmSystemTools.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index ebbcaa6..52995f6 100644
--- a/Source/cmSystemTools.cxx
+++ b/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()))