]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Check for ArborX C++20 bug 15757/head
authorDaniel Arndt <arndtd@ornl.gov>
Sun, 16 Jul 2023 16:56:45 +0000 (12:56 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Sun, 16 Jul 2023 16:58:39 +0000 (12:58 -0400)
cmake/configure/configure_50_arborx.cmake

index 5b0070ec182b18f5e5849f42fddbad1921b16337..7c65183aa88bde953f499dec89bbb67c3ff768ad 100644 (file)
@@ -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 <ArborX.hpp>
+      int main() {
+        Kokkos::View<ArborX::Point*, Kokkos::HostSpace> points(\"points\", 0);
+        [[maybe_unused]] ArborX::BVH<Kokkos::HostSpace> 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})

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.