diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-03-27 02:34:27 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-03-27 02:34:27 (GMT) |
commit | b487030bd978941372766eabe4baa8fec0808bc0 (patch) | |
tree | 569f039b8052d4d323c776b398685c4fd2952df2 /Source | |
parent | 6502177306899f78b538bfb4ef62feee8fbb49eb (diff) | |
download | CMake-b487030bd978941372766eabe4baa8fec0808bc0.zip CMake-b487030bd978941372766eabe4baa8fec0808bc0.tar.gz CMake-b487030bd978941372766eabe4baa8fec0808bc0.tar.bz2 |
ENH: clean up annoying output from rc tool in VS9
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmake.cxx | 13 |
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 |