summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmake.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 88f1290..3b99a82 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -3936,10 +3936,15 @@ bool cmake::RunCommand(const char* comment,
// use rc command to create .res file
cmSystemTools::RunSingleCommand(command,
&output,
- &retCode);
- if(verbose)
- {
- std::cout << output << "\n";
+ &retCode, 0, false);
+ // always print the output of the command, unless
+ // it is the dumb rc command banner, but if the command
+ // returned an error code then print the output anyway as
+ // the banner may be mixed with some other important information.
+ if(output.find("Resource Compiler Version") == output.npos
+ || retCode !=0)
+ {
+ std::cout << output;
}
// if retCodeOut is requested then always return true
// and set the retCodeOut to retCode