summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-10-07 01:24:37 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-10-07 01:24:37 (GMT)
commit51f399ca294d2c78c49b56a4ce5acadd62966b7c (patch)
treeab883925ecda7827296c3f8041a66f2e48ce680a /Source/cmSystemTools.cxx
parent088709e99fa56e19cd73ff614bc508f908dd9b49 (diff)
downloadCMake-51f399ca294d2c78c49b56a4ce5acadd62966b7c.zip
CMake-51f399ca294d2c78c49b56a4ce5acadd62966b7c.tar.gz
CMake-51f399ca294d2c78c49b56a4ce5acadd62966b7c.tar.bz2
Fix for run command on windows. If you specify command in quotes but not full path, it should still work
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 358edd0..9512179 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1508,9 +1508,13 @@ bool cmSystemTools::RunCommand(const char* command,
std::string shortCmd;
std::string cmd = quoted.match(1);
std::string args = quoted.match(2);
- if(!cmSystemTools::GetShortPath(cmd.c_str(), shortCmd))
+ if(! cmSystemTools::FileExists(cmd.c_str()) )
{
- cmSystemTools::Error("GetShortPath failed for " , cmd.c_str());
+ shortCmd = cmd;
+ }
+ else if(!cmSystemTools::GetShortPath(cmd.c_str(), shortCmd))
+ {
+ cmSystemTools::Error("GetShortPath failed for " , cmd.c_str());
return false;
}
shortCmd += " ";