summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-05-23 20:28:34 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-05-23 20:28:34 (GMT)
commit768134c690a2d9a6cf2669e2a46189936fcae2aa (patch)
tree8ffddb156bd1d131a5ce30b766a79509b49840b3 /Source/cmSystemTools.cxx
parent1a2a3abbfd4d98fa541ab67635bc72ff125773b3 (diff)
downloadCMake-768134c690a2d9a6cf2669e2a46189936fcae2aa.zip
CMake-768134c690a2d9a6cf2669e2a46189936fcae2aa.tar.gz
CMake-768134c690a2d9a6cf2669e2a46189936fcae2aa.tar.bz2
command line fixes for win32
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index c944515..7f9bb12 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -734,7 +734,13 @@ std::string cmSystemTools::FindProgram(const char* name,
{
return cmSystemTools::CollapseFullPath(name);
}
-
+ std::string tryPath = name;
+ tryPath += cmSystemTools::GetExecutableExtension();
+ if(cmSystemTools::FileExists(tryPath.c_str()))
+ {
+ return cmSystemTools::CollapseFullPath(tryPath.c_str());
+ }
+
// Add the system search path to our path.
std::vector<std::string> path = userPaths;
cmSystemTools::GetPath(path);
@@ -742,7 +748,7 @@ std::string cmSystemTools::FindProgram(const char* name,
for(std::vector<std::string>::const_iterator p = path.begin();
p != path.end(); ++p)
{
- std::string tryPath = *p;
+ tryPath = *p;
tryPath += "/";
tryPath += name;
if(cmSystemTools::FileExists(tryPath.c_str()))