diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-02-28 15:41:27 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-02-28 15:41:27 (GMT) |
commit | e179ddde125a6f3ef324fb5f93162730aa628e20 (patch) | |
tree | e08f718fde66d6f1cb3f89eafc6c952f01f78e38 /Source | |
parent | c133a6acfa2e8fe141076bb0f4c3441d8cc082ad (diff) | |
download | CMake-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.cxx | 8 |
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())) |