mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-30 18:29:37 -06:00
CheckLanguage: Don't pass CMAKE_CUDA_HOST_COMPILER for Visual Studio
Visual Studio doesn't support specifying it and if we do we get a warning. Fixes: #22712
This commit is contained in:
@@ -46,7 +46,7 @@ macro(check_language lang)
|
||||
file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Check${lang})
|
||||
|
||||
set(extra_compiler_variables)
|
||||
if(${lang} STREQUAL CUDA)
|
||||
if(${lang} STREQUAL CUDA AND NOT CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
set(extra_compiler_variables "set(CMAKE_CUDA_HOST_COMPILER \\\"\${CMAKE_CUDA_HOST_COMPILER}\\\")")
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user