From 64a8468956aade39c69b02398fe10701edb0d914 Mon Sep 17 00:00:00 2001
From: peters <peters@irmb.tu-bs.de>
Date: Wed, 17 Mar 2021 08:54:16 +0100
Subject: [PATCH] As the cuda warnings are different on each platform and super
 badly documented, we switch to suppress all warnings for the GridGenerator.

---
 CMakeLists.txt                       |  2 --
 src/gpu/GridGenerator/CMakeLists.txt | 18 ++----------------
 2 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c67ec6b6..d6ccf3bdb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -113,8 +113,6 @@ if(BUILD_VF_GPU)
 
     set(CMAKE_CUDA_STANDARD_REQUIRED TRUE)
 
-    set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcudafe --display_error_number")
-
     if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
         message(WARNING "CMAKE_CUDA_ARCHITECTURES was not defined and is set to 30 (CUDA support until 10.1 only).")
         set(CMAKE_CUDA_ARCHITECTURES 30)
diff --git a/src/gpu/GridGenerator/CMakeLists.txt b/src/gpu/GridGenerator/CMakeLists.txt
index 516e56047..29d77897a 100644
--- a/src/gpu/GridGenerator/CMakeLists.txt
+++ b/src/gpu/GridGenerator/CMakeLists.txt
@@ -12,19 +12,5 @@ if (NOT BUILD_SHARED_LIBRARY)
     set_target_properties(${library_name} PROPERTIES CUDA_RESOLVE_DEVICE_SYMBOLS ON)
 endif()
 
-# suppress warning 3123, 3126: calling a __host__ function from __host__ __device__ is not allowed
-# suppress warning 3152: __host__ function redeclared with __host__ __device__, hence treated as a __host__ __device__ function
-# suppress warning 3125, 3127: calling a constexpr __host__ function from a __host__ __device__ function
-set(cuda_warnings_suppressions "--diag_suppress=3123 --diag_suppress=3126 --diag_suppress=3152 --diag_suppress=3125 --diag_suppress=3127")
-
-# suppress warning 3311: unrecognized #pragma in device code
-if(NOT MSVC)
-    set(cuda_warnings_suppressions "${cuda_warnings_suppressions} --diag_suppress=3311")
-endif()
-
-# suppress warning 2979: calling a __host__ function from __host__ __device__ is not allowed
-if(MSVC)
-    set(cuda_warnings_suppressions "${cuda_warnings_suppressions} --diag_suppress=2979 --diag_suppress=2976 --diag_suppress=3005 --diag_suppress=2978 --diag_suppress=3009")
-endif()
-
-target_compile_options(${library_name} PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe ${cuda_warnings_suppressions} >)
+# we want to suppress all cuda warnings so far for this library.
+target_compile_options(${library_name} PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe "-w" >)
-- 
GitLab