Respect the compiler target value `CMAKE_<LANG>_COMPILER_TARGET` in `CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND`. Issue: #18425