From 5b68dc5be35ccc4b964d922140f960de737599a5 Mon Sep 17 00:00:00 2001
From: Timo Heister <timo.heister@gmail.com>
Date: Sun, 11 Aug 2024 13:21:58 -0400
Subject: [PATCH] Kokkos+CUDA: disable warning

nvcc decides that it should produce a warning about a missing return in
a situation like this:
```
{
  if (check)
    return true;
  else
    return false;
}
```
Disable this warning.
---
 cmake/modules/FindDEAL_II_KOKKOS.cmake | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cmake/modules/FindDEAL_II_KOKKOS.cmake b/cmake/modules/FindDEAL_II_KOKKOS.cmake
index c0958d4a34..142edccc3b 100644
--- a/cmake/modules/FindDEAL_II_KOKKOS.cmake
+++ b/cmake/modules/FindDEAL_II_KOKKOS.cmake
@@ -77,5 +77,7 @@ if(Kokkos_FOUND)
     enable_if_supported(DEAL_II_CXX_FLAGS "-Xcudafe --diag_suppress=284")
     # variable "i" was set but never used:
     enable_if_supported(DEAL_II_CXX_FLAGS "-Xcudafe --diag_suppress=550")
+    # warning #940-D: missing return statement at end of non-void function
+    enable_if_supported(DEAL_II_CXX_FLAGS "-Xcudafe --diag_suppress=940")
   endif()
 endif()
-- 
2.39.5