Tests: Add cases for CMAKE_CUDA_ARCHITECTURES={all,all-major}

The `CudaOnly.All` test only sets these in project code after CUDA is
enabled.  Add another case to test the values during compiler detection.

Issue: #23161
5 files changed