mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-30 18:29:37 -06:00
Merge topic 'cuda_clang_limitations' into release-3.18
bdb105ee94Help: Mention CUDA Clang limitations in 3.18 release notesfec7dd33d3CUDA: Add issue number to Clang separable compilation error14163d7d6bCUDA: Throw error for Clang on Windows Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4903
This commit is contained in:
@@ -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
|
||||
------------
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user