-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
35 lines (23 loc) · 759 Bytes
/
CMakeLists.txt
File metadata and controls
35 lines (23 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
cmake_minimum_required(VERSION 3.20)
project(GS-kokkos)
set(Kokkos_COMMON_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../dep/Kokkos)
find_package(Kokkos CONFIG)
add_subdirectory(external/HighFive)
if(Kokkos_FOUND)
message(STATUS "Found Kokkos: ${Kokkos_DIR} (version \"${Kokkos_VERSION}\")")
else()
if(EXISTS ${Kokkos_COMMON_SOURCE_DIR})
add_subdirectory(${Kokkos_COMMON_SOURCE_DIR} Kokkos)
else()
include(FetchContent)
FetchContent_Declare(
Kokkos
GIT_REPOSITORY https://github.com/kokkos/kokkos.git
GIT_TAG 4.0.01
SOURCE_DIR ${Kokkos_COMMON_SOURCE_DIR}
)
FetchContent_MakeAvailable(Kokkos)
endif()
endif()
add_executable(GS src/main.cpp)
target_link_libraries(GS Kokkos::kokkos HighFive)