From b487030bd978941372766eabe4baa8fec0808bc0 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 26 Mar 2008 22:34:27 -0400 Subject: [PATCH] ENH: clean up annoying output from rc tool in VS9 --- Source/cmake.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 88f1290b5..3b99a8208 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) + &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 << "\n"; + std::cout << output; } // if retCodeOut is requested then always return true // and set the retCodeOut to retCode