From 8a966debe30324c38d5ab91adaeec10c0d6cafd3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 14 Sep 2023 10:40:21 -0400 Subject: CUDA: Combine consecutive blocks using same condition for determining compiler --- Modules/CMakeDetermineCUDACompiler.cmake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake index de765d7..a5008e1 100644 --- a/Modules/CMakeDetermineCUDACompiler.cmake +++ b/Modules/CMakeDetermineCUDACompiler.cmake @@ -236,11 +236,9 @@ if(NOT CMAKE_CUDA_COMPILER_ID_RUN) else() set(CMAKE_CUDA_COMPILER_TOOLKIT_LIBRARY_ROOT "${CMAKE_CUDA_COMPILER_TOOLKIT_ROOT}") endif() - endif() - # For regular nvcc we the toolkit version is the same as the compiler version and we can parse it from the vendor test output. - # For Clang we need to invoke nvcc to get version output. - if(NOT CMAKE_GENERATOR MATCHES "Visual Studio") + # For regular nvcc we the toolkit version is the same as the compiler version and we can parse it from the vendor test output. + # For Clang we need to invoke nvcc to get version output. if(CMAKE_CUDA_COMPILER_ID STREQUAL "Clang") execute_process(COMMAND ${_CUDA_NVCC_EXECUTABLE} "--version" OUTPUT_VARIABLE CMAKE_CUDA_COMPILER_ID_OUTPUT) endif() -- cgit v0.12