summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2020-06-16 17:13:56 +0300
committerBrad King <brad.king@kitware.com>2020-06-16 14:06:43 -0400
commit14163d7d6b818ac1add7d467b643abfed8fe7216 (patch)
treedd6d67e536f158878de64649cb5113dcdaeacba5
parent3f110a08571e3a506184e6b8a8e9622317435912 (diff)
downloadcmake-14163d7d6b818ac1add7d467b643abfed8fe7216.tar.gz
CUDA: Throw error for Clang on Windows
Supporting compiling on Windows is more complicated than initially expected, so it won't make it into CMake 3.18. Add a helpful error for users.
-rw-r--r--Modules/CMakeDetermineCUDACompiler.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake
index a0f7202b0b..e12da45872 100644
--- a/Modules/CMakeDetermineCUDACompiler.cmake
+++ b/Modules/CMakeDetermineCUDACompiler.cmake
@@ -198,6 +198,10 @@ if(NOT CMAKE_CUDA_COMPILER_ID_RUN)
string(APPEND nvcc_test_flags " -ccbin=${CMAKE_CUDA_HOST_COMPILER}")
endif()
elseif(CMAKE_CUDA_COMPILER_ID STREQUAL "Clang")
+ if(WIN32)
+ message(FATAL_ERROR "Clang with CUDA is not yet supported on Windows. See CMake issue #20776.")
+ endif()
+
set(clang_test_flags "--cuda-path=\"${CMAKE_CUDA_COMPILER_LIBRARY_ROOT}\"")
if(CMAKE_CROSSCOMPILING)
# Need to pass the host target and include directories if we're crosscompiling.