From 8bf2049f750a4e19056f994dbea001ca4f1f3ef4 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Wed, 24 Jan 2024 15:28:59 -0500 Subject: [PATCH] Kokkos+Cuda: enforce expt-relaxed-constexpr --- cmake/modules/FindDEAL_II_KOKKOS.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/modules/FindDEAL_II_KOKKOS.cmake b/cmake/modules/FindDEAL_II_KOKKOS.cmake index e39e93ea26..a750fd820c 100644 --- a/cmake/modules/FindDEAL_II_KOKKOS.cmake +++ b/cmake/modules/FindDEAL_II_KOKKOS.cmake @@ -48,8 +48,10 @@ else() # we don't know if CUDA support is enabled in Kokkos if(Kokkos_ENABLE_CUDA) set(DEAL_II_VECTORIZATION_WIDTH_IN_BITS 0) - # Require lambda support to use Kokkos as a backend - KOKKOS_CHECK(OPTIONS CUDA_LAMBDA) + # Require lambda support and expt-relaxed-constexpr for Cuda + # so that we can use std::array and other interfaces with + # __host__ constexpr functions in device code + KOKKOS_CHECK(OPTIONS CUDA_LAMBDA CUDA_CONSTEXPR) # Disable a bunch of annoying warnings generated by boost, template code, # and in other random places: -- 2.39.5