summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-06-23 20:34:38 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-06-23 20:34:38 (GMT)
commit2705b1bf736e5f98b0862e831fe9ab2799d1d0ee (patch)
tree4e3cc1d74fbae4c2f34df019f812f00a11b21b2a /Source/cmSystemTools.cxx
parentdc4a6f63b0452968dc564be46909ed228bbc141c (diff)
downloadCMake-2705b1bf736e5f98b0862e831fe9ab2799d1d0ee.zip
CMake-2705b1bf736e5f98b0862e831fe9ab2799d1d0ee.tar.gz
CMake-2705b1bf736e5f98b0862e831fe9ab2799d1d0ee.tar.bz2
BUG: fix spaces in path on mingw, and change EXEC_PROGRAM to return false when it does not run, also do not convert the directory to an output path for EXEC_PROGRAM as this is done by the process execution, and doing it twice may cause trouble on some shells.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 9fc0060..5c1d5af 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -573,7 +573,6 @@ bool RunCommandViaWin32(const char* command,
cmSystemTools::Error("No command specified");
return false;
}
-
cmWin32ProcessExecution resProc;
if(cmSystemTools::GetRunCommandHideConsole())
{
@@ -586,6 +585,11 @@ bool RunCommandViaWin32(const char* command,
}
if ( !resProc.StartProcess(command, dir, verbose) )
{
+ output = resProc.GetOutput();
+ if(verbose)
+ {
+ cmSystemTools::Stdout(output.c_str());
+ }
return false;
}
resProc.Wait(timeout);
@@ -1148,6 +1152,15 @@ std::string cmSystemTools::ConvertToOutputPath(const char* path)
#endif
}
+std::string cmSystemTools::ConvertToRunCommandPath(const char* path)
+{
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ return cmSystemTools::ConvertToWindowsOutputPath(path);
+#else
+ return cmSystemTools::ConvertToUnixOutputPath(path);
+#endif
+}
+
bool cmSystemTools::StringEndsWith(const char* str1, const char* str2)
{
if ( !str1 || !str2 || strlen(str1) < strlen(str2) )