mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 16:18:43 -05:00
CUDA: Revert "Always mark cuda toolkit as system include"
We need to revert this change as it can disable error messages
when compiling invalid CUDA code.
This reverts commit ea659b155d (CUDA: Always mark cuda toolkit as system
include, 2022-06-27, v3.25.0-rc1~269^2).
This commit is contained in:
committed by
Brad King
parent
20bfbf7838
commit
d0e52219eb
@@ -127,8 +127,10 @@ 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.
|
||||
# CMake will explicitly mark these as SYSTEM to NVCC since it implicitly
|
||||
# adds them as user includes and not system
|
||||
# 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
|
||||
if(CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES)
|
||||
list(REMOVE_ITEM CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES
|
||||
${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
|
||||
|
||||
Reference in New Issue
Block a user