From aacd70e1131d39382aebeca12cc2d61a4da45cd8 Mon Sep 17 00:00:00 2001 From: Pierre Kestener Date: Tue, 25 Jul 2023 17:40:00 +0200 Subject: [PATCH] Update cmake for building kokkos. --- cmake/build_or_find_kokkos.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmake/build_or_find_kokkos.cmake b/cmake/build_or_find_kokkos.cmake index f6230b4..5361dab 100644 --- a/cmake/build_or_find_kokkos.cmake +++ b/cmake/build_or_find_kokkos.cmake @@ -34,6 +34,7 @@ set_property(CACHE EULER2D_KOKKOS_BACKEND PROPERTY STRINGS if(EULER2D_KOKKOS_BUILD) message("[euler2d / kokkos] Building kokkos from source") + message("[euler2d / kokkos] Building kokkos from source using git ? ${EULER2D_KOKKOS_USE_GIT}") # Kokkos default build options @@ -105,14 +106,19 @@ if(EULER2D_KOKKOS_BUILD) #find_package(Git REQUIRED) include (FetchContent) + # set a default value for kokkos archive file to use when not using git + if (NOT DEFINED EULER2D_KOKKOS_SOURCE_ARCHIVE) + set(EULER2D_KOKKOS_SOURCE_ARCHIVE https://github.com/kokkos/kokkos/archive/refs/tags/4.1.00.tar.gz CACHE STRING "Kokkos source archive (can be a URL or local filepath).") + endif() + if (EULER2D_KOKKOS_USE_GIT) FetchContent_Declare( kokkos_external GIT_REPOSITORY https://github.com/kokkos/kokkos.git - GIT_TAG 4.0.00 + GIT_TAG 4.1.00 ) else() FetchContent_Declare( kokkos_external - URL https://github.com/kokkos/kokkos/archive/refs/tags/4.0.00.tar.gz + URL ${EULER2D_KOKKOS_SOURCE_ARCHIVE} ) endif()