From e179ddde125a6f3ef324fb5f93162730aa628e20 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 28 Feb 2002 10:41:27 -0500 Subject: [PATCH] ENH: look for .com files before .exe --- Source/cmSystemTools.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index ebbcaa6a2..52995f606 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()))