Skip to content

Commit

Permalink
Suppressed any possible warnings from the Thrust headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
krasznaa committed Oct 31, 2023
1 parent 546b7b8 commit 0956288
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion extern/thrust/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Detray library, part of the ACTS project (R&D line)
#
# (c) 2021 CERN for the benefit of the ACTS project
# (c) 2021-2023 CERN for the benefit of the ACTS project
#
# Mozilla Public License Version 2.0

Expand Down Expand Up @@ -29,3 +29,11 @@ set( THRUST_ENABLE_INSTALL_RULES TRUE CACHE BOOL

# Get it into the current directory.
FetchContent_MakeAvailable( Thrust )

# Treat the Thrust headers as "system headers", to avoid getting warnings from
# them. But not for CUDA, as that would make it pick up CUB from the CUDA
# installation. Breaking the build.
get_target_property( _incDirs _Thrust_Thrust INTERFACE_INCLUDE_DIRECTORIES )
target_include_directories( _Thrust_Thrust SYSTEM
INTERFACE $<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:${_incDirs}> )
unset( _incDirs )

0 comments on commit 0956288

Please sign in to comment.