cmake_llvm_rc: preprocessor errors are silently discarded
When using llvm-rc as the CMAKE_RC_COMPILER, CMake 3.17 runs a preprocessing step prior to invoking llvm-rc.
However if the preprocessor fails and writes errors to stderr, these errors are silently discarded instead of being surfaced to the user.
To repro
$ echo "#error Should be printed" > foo.rc
$ cmake-3.17 -E cmake_llvm_rc foo.pp /usr/local/opt/llvm/bin/clang-cl -DRC_INVOKED -E foo.rc -- /usr/local/opt/llvm/bin/llvm-rc /fo foo.rc.obj foo.pp
Expected behaviour
Command fails; preprocessor error is printed.
Actual behaviour
Command fails; no errors printed
Workaround
Invoke the preprocessor manually to see the actual error.