summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-17 10:44:18 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-06-17 10:44:25 (GMT)
commit55ade79ab830d6792917378daedb9d255a346c47 (patch)
treeeb0a0f42c55d0ececf425f6a2275c346bd326ccc
parentf9f1067c177feb7a32f9b957bff2bcb3e9da333f (diff)
parentbdb105ee94046f0b89e60c9fabe4e4a058844005 (diff)
downloadCMake-55ade79ab830d6792917378daedb9d255a346c47.zip
CMake-55ade79ab830d6792917378daedb9d255a346c47.tar.gz
CMake-55ade79ab830d6792917378daedb9d255a346c47.tar.bz2
Merge topic 'cuda_clang_limitations'
bdb105ee94 Help: Mention CUDA Clang limitations in 3.18 release notes fec7dd33d3 CUDA: Add issue number to Clang separable compilation error 14163d7d6b CUDA: Throw error for Clang on Windows Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4903
-rw-r--r--Help/release/3.18.rst3
-rw-r--r--Modules/CMakeDetermineCUDACompiler.cmake4
-rw-r--r--Source/cmLocalGenerator.cxx3
3 files changed, 8 insertions, 2 deletions
diff --git a/Help/release/3.18.rst b/Help/release/3.18.rst
index db5f62a..072f9aa 100644
--- a/Help/release/3.18.rst
+++ b/Help/release/3.18.rst
@@ -13,7 +13,8 @@ New Features
Languages
---------
-* The ``CUDA`` language can now be compiled using Clang.
+* The ``CUDA`` language can now be compiled using Clang on non-Windows
+ platforms. Separable compilation is not yet supported on any platform.
Command-Line
------------
diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake
index a0f7202..e12da45 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.
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index f748822..3b3f110 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1997,7 +1997,8 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags,
if (separable) {
this->Makefile->IssueMessage(
MessageType::FATAL_ERROR,
- "CUDA_SEPARABLE_COMPILATION isn't supported on Clang.");
+ "CUDA_SEPARABLE_COMPILATION isn't supported on Clang. "
+ "See CMake issue #20726.");
}
}
}