summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-09-14 14:40:21 (GMT)
committerBrad King <brad.king@kitware.com>2023-09-21 19:34:26 (GMT)
commit8a966debe30324c38d5ab91adaeec10c0d6cafd3 (patch)
tree16ee0633ca0308ccafb0a355973739dbf0d98546 /Modules
parent72efbeadae4b99db0d26802d95771873873151db (diff)
downloadCMake-8a966debe30324c38d5ab91adaeec10c0d6cafd3.zip
CMake-8a966debe30324c38d5ab91adaeec10c0d6cafd3.tar.gz
CMake-8a966debe30324c38d5ab91adaeec10c0d6cafd3.tar.bz2
CUDA: Combine consecutive blocks using same condition for determining compiler
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCUDACompiler.cmake6
1 files 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()