diff options
author | Thomas Bernard <tbernard@go-engineering.de> | 2020-03-25 22:34:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-03-26 11:59:55 (GMT) |
commit | dc93cbb0d8a1f0acb12097d18e7764e856818a7b (patch) | |
tree | f97705aafde39e7b880a4abf391b153a80454b6f /Source/cmcmd.cxx | |
parent | e3185e3d1b92a95c18f22f70b3cef6944dd019eb (diff) | |
download | CMake-dc93cbb0d8a1f0acb12097d18e7764e856818a7b.zip CMake-dc93cbb0d8a1f0acb12097d18e7764e856818a7b.tar.gz CMake-dc93cbb0d8a1f0acb12097d18e7764e856818a7b.tar.bz2 |
llvm-rc: Print stderr output when calling tools through cmake_llvm_rc
The stored error pipe is output if the program fails.
Fixes: #20494
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 7eeb97f..2bccbc7 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -1697,6 +1697,11 @@ int cmcmd::RunPreprocessor(const std::vector<std::string>& command, } auto status = process.GetStatus(); if (!status[0] || status[0]->ExitStatus != 0) { + auto errorStream = process.ErrorStream(); + if (errorStream) { + std::cerr << errorStream->rdbuf(); + } + return 1; } @@ -1765,6 +1770,10 @@ int cmcmd::RunLLVMRC(std::vector<std::string> const& args) } auto status = process.GetStatus(); if (!status[0] || status[0]->ExitStatus != 0) { + auto errorStream = process.ErrorStream(); + if (errorStream) { + std::cerr << errorStream->rdbuf(); + } return 1; } |