From 0956288c7e2d3884590d0cbc0dabd261ce97c03b Mon Sep 17 00:00:00 2001 From: Attila Krasznahorkay Date: Mon, 30 Oct 2023 23:16:52 +0100 Subject: [PATCH] Suppressed any possible warnings from the Thrust headers. --- extern/thrust/CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/extern/thrust/CMakeLists.txt b/extern/thrust/CMakeLists.txt index 0416ac26d7..7d20ccae8a 100644 --- a/extern/thrust/CMakeLists.txt +++ b/extern/thrust/CMakeLists.txt @@ -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 @@ -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 $<$>:${_incDirs}> ) +unset( _incDirs )