diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 3717a90b0..d25340170 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1479,6 +1479,7 @@ bool RunCommandViaWin32(const char* command, int& retVal, bool verbose) { + ::SetLastError(ERROR_SUCCESS); if ( ! command ) { cmSystemTools::Error("No command specified");