Skip to content

Commit

Permalink
Update cmake for building kokkos.
Browse files Browse the repository at this point in the history
  • Loading branch information
pkestene committed Jul 25, 2023
1 parent cca7dcc commit aacd70e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmake/build_or_find_kokkos.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit aacd70e

Please sign in to comment.