From: Daniel Arndt Date: Sun, 16 Jul 2023 16:56:45 +0000 (-0400) Subject: Check for ArborX C++20 bug X-Git-Tag: relicensing~667^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15757%2Fhead;p=dealii.git Check for ArborX C++20 bug --- diff --git a/cmake/configure/configure_50_arborx.cmake b/cmake/configure/configure_50_arborx.cmake index 5b0070ec18..7c65183aa8 100644 --- a/cmake/configure/configure_50_arborx.cmake +++ b/cmake/configure/configure_50_arborx.cmake @@ -46,6 +46,33 @@ macro(feature_arborx_find_external var) ) set(${var} FALSE) endif() + + list(APPEND CMAKE_REQUIRED_LIBRARIES + ArborX::ArborX + ) + + check_cxx_compiler_bug( + " + #include + int main() { + Kokkos::View points(\"points\", 0); + [[maybe_unused]] ArborX::BVH bvh(Kokkos::DefaultExecutionSpace{}, points); + } + " + DEAL_II_ARBORX_CXX20_BUG) + reset_cmake_required() + + if(DEAL_II_ARBORX_CXX20_BUG) + message(STATUS "Could not find a sufficient ArborX installation: " + "The ArborX version doesn't work with C++20 or higher." + ) + set(ARBORX_ADDITIONAL_ERROR_STRING + ${ARBORX_ADDITIONAL_ERROR_STRING} + "Could not find a sufficient ArborX installation:\n" + "The ArborX version doesn't work with C++20 or higher. Try using a later ArborX release or try specifying a lower C++ standard.\n" + ) + set(${var} FALSE) + endif() endif() set(DEAL_II_ARBORX_WITH_MPI ${ARBORX_WITH_MPI})