CUDA: Defer architecture testing to the compiler testing step
The original reason for performing extra detections was to be able to determine whether user-specified CUDA architectures work and output a friendly error. This causes extra compiler runs, which can be very expensive for MSBuild, as pointed out in https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6816#note_1102125 and potentially make implementing features such as #22860 very expensive.
Ideally we would defer architecture testing to the already existing testing step, which uses a more complete set of flags. This should result in more complete errors (see https://gitlab.kitware.com/cmake/cmake/-/issues/23010#note_1108861) that are more uniform with other languages. In case of any improvements required to the error messages all languages would benefit from them.
We would no longer test user-specified architectures during detection, but would still be able to determine default architectures if unset by the user.
issue