diff options
author | Raul Tambre <raul@tambre.ee> | 2020-03-07 15:29:29 (GMT) |
---|---|---|
committer | Raul Tambre <raul@tambre.ee> | 2020-05-15 14:46:51 (GMT) |
commit | 5df21adf46be14061fe0e8ea53213d905e834600 (patch) | |
tree | 9e50ef0dc770d6ad68eede0ad04e5058d1775069 /Modules/CMakeCompilerIdDetection.cmake | |
parent | dc2eae1f91f98019efe14c1398e10f23e93a7005 (diff) | |
download | CMake-5df21adf46be14061fe0e8ea53213d905e834600.zip CMake-5df21adf46be14061fe0e8ea53213d905e834600.tar.gz CMake-5df21adf46be14061fe0e8ea53213d905e834600.tar.bz2 |
CUDA: Add support for Clang compiler
When crosscompiling we pass the sysroot.
We need to try various architecture flags. Clang doesn't automatically
select one that works. First try the ones that are more likely to work
for modern installations:
* <=sm_50 is deprecated since CUDA 10.2, try sm_52 first for
future compatibility.
* <=sm_20 is removed since CUDA 9.0, try sm_30.
Otherwise fallback to Clang's current default. Currently that's `sm_20`,
the lowest it supports.
Separable compilation isn't supported yet.
Fixes: #16586
Diffstat (limited to 'Modules/CMakeCompilerIdDetection.cmake')
-rw-r--r-- | Modules/CMakeCompilerIdDetection.cmake | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/CMakeCompilerIdDetection.cmake b/Modules/CMakeCompilerIdDetection.cmake index bb573b7..acd15df 100644 --- a/Modules/CMakeCompilerIdDetection.cmake +++ b/Modules/CMakeCompilerIdDetection.cmake @@ -89,9 +89,8 @@ function(compiler_id_detection outvar lang) ) endif() - #Currently the only CUDA compilers are NVIDIA if(lang STREQUAL CUDA) - set(ordered_compilers NVIDIA) + set(ordered_compilers NVIDIA Clang) endif() if(CID_ID_DEFINE) |