Skip to content
Snippets Groups Projects
Commit 04157ded authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Deactivate Kokkos mdspan impl if standard header is not found

parent a16dac23
No related branches found
No related tags found
1 merge request!203git subrepo pull packages/HighFive
......@@ -6,6 +6,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# Forbids in-source builds
include(CheckNotInSources)
# Check for some headers
include(CheckIncludeFileCXX)
# use PkgConfig to find packages
find_package(PkgConfig REQUIRED)
......@@ -404,6 +407,13 @@ set(CMAKE_CXX_STANDARD "20")
set(KOKKOS_SOURCE_DIR "${PUGS_SOURCE_DIR}/packages/kokkos")
set(KOKKOS_BINARY_DIR "${PUGS_BINARY_DIR}/packages/kokkos")
# test since mdspan is not supported by g++-10 and clang-11 (used in CI)
check_include_file_cxx("mdspan" CXX_MDSPAN_SUPPORT)
if (NOT DEFINED ${CXX_MDSPAN_SUPPORT})
message(STATUS "Kokkos_ENABLE_IMPL_MDSPAN is deactivated since standard library does not support mdspan")
set(Kokkos_ENABLE_IMPL_MDSPAN OFF CACHE BOOL "")
endif()
# disable Kokkos deprecation warnings by default
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment