Support for CUDA & ClangCL on Windows

When trying to build a simple CUDA project on Windows and optimistically specifying -T ClangCL, CMake complains about unknown CUDA compiler

Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.
The CXX compiler identification is Clang 10.0.0 with MSVC-like command-line
The CUDA compiler identification is unknown
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/Llvm/bin/clang-cl.exe - skipped
Detecting CXX compile features
Detecting CXX compile features - done
CMake Error at CMakeLists.txt:7 (project):
  No CMAKE_CUDA_COMPILER could be found.

I’m aware that the support is still pretty sketchy, but I’m in principle able to compile simple code with

> clang++ axpy.cu -o axpy --cuda-gpu-arch=sm_60 -lcudart_static --cuda-path="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2" -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\lib\x64"
clang++: warning: Unknown CUDA version 10.2. Assuming the latest supported version 10.1 [-Wunknown-cuda-version]
   Creating library axpy.lib and object axpy.exp

Would it be possible to add at least some very basic support for CUDA compiled with clang on Windows?

Work is ongoing. See CMake Issue 20776.

Thank you, that’s very good news, I’ll be watching the ticket on GitLab.