Skip to content
Snippets Groups Projects
Commit 04054757 authored by Pradipta Samanta's avatar Pradipta Samanta
Browse files

build kokkos internally along with the package

parent 64d639c4
No related branches found
No related tags found
1 merge request!37Draft: C++ port of horizontal/mo_lib_gradients.F90
......@@ -110,6 +110,22 @@ else()
endif()
endif()
include(FetchContent)
# configure kokkos 4.4 repository link
FetchContent_Declare(kokkos
URL https://github.com/kokkos/kokkos/releases/download/4.4.01/kokkos-4.4.01.tar.gz
URL_HASH MD5=eafd0d42c9831858aa84fde78576644c
)
# disable build of C++23 mdspan experimental support for now
set(Kokkos_ENABLE_IMPL_MDSPAN OFF CACHE BOOL "Experimental mdspan support")
# by default, build the Kokkos serial backend for CPU
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "Kokkos Serial backend")
set(Kokkos_ARCH_NATIVE ON CACHE BOOL "Kokkos native architecture optimisations")
FetchContent_MakeAvailable(kokkos)
add_subdirectory(src)
# Allow for 'make test' even if the tests are disabled:
......
......@@ -57,9 +57,6 @@ if(IM_ENABLE_OPENACC)
endif()
endif()
message(STATUS "iconmath-support enabling Kokkos")
find_package(Kokkos REQUIRED)
target_include_directories(
iconmath-support
PUBLIC
......@@ -77,7 +74,12 @@ target_include_directories(
# https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html
$<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:C,CXX>:${CMAKE_CURRENT_BINARY_DIR}>>)
target_link_libraries(iconmath-support PUBLIC fortran-support::fortran-support Kokkos::kokkos)
target_link_libraries(iconmath-support
PUBLIC
fortran-support::fortran-support
PRIVATE
Kokkos::kokkos
)
install(TARGETS iconmath-support EXPORT "${PROJECT_NAME}-targets")
......
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