CMAKE_RC_COMPILER should be optional
Currently, if I want to use CMake on a trivial project that has no resources, I'm forced to specify
CMAKE_RC_COMPILER whether I intend to use it or not. I think it would be preferable to only require
CMAKE_RC_COMPILER if a target requires it, though I realise that would disable the ability to verify the RC compiler is in working order, during the configure stage.
An example configure error is listed below:
$ ../../cmake/build/bin/cmake.exe -GNinja .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_EXTENSIONS=NO
-- The CXX compiler identification is Clang 8.0.0 with GNU-like command-line
-- The C compiler identification is Clang 8.0.0 with GNU-like command-line
CMake Error at C:/Code/cmake/cmake/Modules/Platform/Windows-Clang.cmake:81 (enable_language):
No CMAKE_RC_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "RC" or the CMake cache entry CMAKE_RC_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):