diff options
author | Brad King <brad.king@kitware.com> | 2022-07-05 14:31:11 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-07-05 14:31:22 (GMT) |
commit | 6fee995256fc4b8aae5484eb450499818d65470c (patch) | |
tree | 60aef114cab9600a406c18a493400893fc2592f3 /Modules | |
parent | ba107f05b346de59d72f10aead5f51e577021275 (diff) | |
parent | cd324110d2ecef8dd955f7089382d15708cad98d (diff) | |
download | CMake-6fee995256fc4b8aae5484eb450499818d65470c.zip CMake-6fee995256fc4b8aae5484eb450499818d65470c.tar.gz CMake-6fee995256fc4b8aae5484eb450499818d65470c.tar.bz2 |
Merge topic 'add_nvcc_compile_warning_support' into release-3.24
cd324110d2 CUDA: NVCC support for COMPILE_WARNING_AS_ERROR target property
2e9ac1d272 Tests: Refactor warn on error tests to support multiple languages
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7417
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Compiler/NVIDIA-CUDA.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake index 2f12b43..2e3ae2c 100644 --- a/Modules/Compiler/NVIDIA-CUDA.cmake +++ b/Modules/Compiler/NVIDIA-CUDA.cmake @@ -30,6 +30,11 @@ if(CMAKE_CUDA_HOST_COMPILER AND NOT CMAKE_GENERATOR MATCHES "Visual Studio") endif() if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 10.2.89) + # Starting in 10.2, nvcc supported treating all warnings as errors + set(CMAKE_CUDA_COMPILE_OPTIONS_WARNING_AS_ERROR "-Werror all-warnings") +endif() + +if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 10.2.89) # The -MD flag was only added to nvcc in 10.2 so # before that we had to invoke the compiler twice # to get header dependency information |