Skip to content

Commit

Permalink
Merge pull request #15757 from masterleinad/arborx_c++20_bug
Browse files Browse the repository at this point in the history
Check for ArborX C++20 bug
  • Loading branch information
tamiko committed Jul 17, 2023
2 parents db38f30 + 9843b45 commit 34ae3d3
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions cmake/configure/configure_50_arborx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 34ae3d3

Please sign in to comment.