Tests,CUDA: Restore NVCC-specific tests
!4442 (merged) added several conditions testing CMAKE_CUDA_COMPILER_ID
for NVIDIA
or Clang
to enable respective tests. However, the CMAKE_CUDA_COMPILER_ID
variable is not defined when configuring CMake itself. It is therefore not available in Tests/Cuda/CMakeLists.txt
, Tests/CudaOnly/CMakeLists.txt
, or Tests/RunCMake/*/RunCMakeTest.cmake
. As a result, a bunch of the NVCC-specific tests are no longer running at all.
The CMake_TEST_CUDA
variable we use to explicitly enable CUDA testing on specific builds could be checked instead, e.g.:
if(CMake_TEST_CUDA)
if(CMake_TEST_CUDA STREQUAL "Clang")
# Clang-specific tests.
else()
# Assume NVCC.
endif()
endif()