diff options
author | Raul Tambre <raul@tambre.ee> | 2021-10-17 17:18:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-10-19 13:03:24 (GMT) |
commit | 7123c8fdbfc8effd0b085e26cef982cc4cd88097 (patch) | |
tree | 1b77d8271103e0448c951d3f15e3c623ba5df742 /Modules/CheckLanguage.cmake | |
parent | 9b29cfd21f7f48a8c6d5010b98fc585452ff6eb2 (diff) | |
download | CMake-7123c8fdbfc8effd0b085e26cef982cc4cd88097.zip CMake-7123c8fdbfc8effd0b085e26cef982cc4cd88097.tar.gz CMake-7123c8fdbfc8effd0b085e26cef982cc4cd88097.tar.bz2 |
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
Diffstat (limited to 'Modules/CheckLanguage.cmake')
-rw-r--r-- | Modules/CheckLanguage.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CheckLanguage.cmake b/Modules/CheckLanguage.cmake index 559c103..52f707c 100644 --- a/Modules/CheckLanguage.cmake +++ b/Modules/CheckLanguage.cmake @@ -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() |