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.
$ 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
Command fails; preprocessor error is printed.
Command fails; no errors printed
Invoke the preprocessor manually to see the actual error.