mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
Previously we relied on the cross-compiling toolchain file to set `CMAKE_SYSTEM_PROCESSOR` to a value consistent with the CUDA compiler's target architecture. When a compiled language is enabled, we now have its target architecture in `CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID`. Use that to select the CUDA toolkit's corresponding target directory. If no language is enabled, or the compiler's target architecture is not known, fall back to `CMAKE_SYSTEM_PROCESSOR`. If that is not set, fail with an explicit error make clear what is wrong.
53 KiB
53 KiB