diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2022-06-27 14:47:02 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2022-08-18 14:37:06 (GMT) |
commit | ea659b155ddcdfb24e93b0d664e1cb67fef6d8a4 (patch) | |
tree | 756316d4a11b4c9880f21218070e7dc7b6dbfdd9 /Modules/CMakeTestCUDACompiler.cmake | |
parent | 9ce5018be9f8ffd2bcfda00b9c1b81d3401e20ba (diff) | |
download | CMake-ea659b155ddcdfb24e93b0d664e1cb67fef6d8a4.zip CMake-ea659b155ddcdfb24e93b0d664e1cb67fef6d8a4.tar.gz CMake-ea659b155ddcdfb24e93b0d664e1cb67fef6d8a4.tar.bz2 |
CUDA: Always mark cuda toolkit as system include
Fixes: #23731
Diffstat (limited to 'Modules/CMakeTestCUDACompiler.cmake')
-rw-r--r-- | Modules/CMakeTestCUDACompiler.cmake | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/CMakeTestCUDACompiler.cmake b/Modules/CMakeTestCUDACompiler.cmake index 853d655..a6d0f8b 100644 --- a/Modules/CMakeTestCUDACompiler.cmake +++ b/Modules/CMakeTestCUDACompiler.cmake @@ -126,10 +126,8 @@ list(REMOVE_ITEM CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES ${CMAKE_CUDA_IMPLICIT_LINK_L if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA") # Remove the CUDA Toolkit include directories from the set of # implicit system include directories. - # This resolves the issue that NVCC doesn't specify these - # includes as SYSTEM includes when compiling device code, and sometimes - # they contain headers that generate warnings, so let users mark them - # as SYSTEM explicitly + # CMake will explicitly mark these as SYSTEM to NVCC since it implicitly + # adds them as user includes and not system if(CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES) list(REMOVE_ITEM CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES} |