-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
36 lines (29 loc) · 916 Bytes
/
CMakeLists.txt
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
30
31
32
33
34
35
36
cmake_minimum_required(VERSION 3.16)
project(P3miniapps LANGUAGES CXX)
# Add cmake helpers
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")
# Find libraries
find_package(mdspan CONFIG)
if(NOT mdspan_FOUND)
add_subdirectory(ext_lib/mdspan)
endif()
set(PROGRAMMING_MODEL AUTO CACHE STRING "CHOICE OF PARALLEL BACKEND")
set(BACKEND AUTO CACHE STRING "CHOICE OF PARALLEL BACKEND")
set(APPLICATION AUTO CACHE STRING "CHOICE OF APPLICATION")
if(PROGRAMMING_MODEL STREQUAL "KOKKOS")
find_package(Kokkos CONFIG)
if(NOT kokkos_FOUND)
add_subdirectory(ext_lib/kokkos)
endif()
endif()
add_subdirectory(lib)
include(CTest)
if(BUILD_TESTING AND (NOT (PROGRAMMING_MODEL STREQUAL "KOKKOS")))
find_package(GTest CONFIG)
if(NOT GTest_FOUND)
add_subdirectory(ext_lib/googletest)
endif()
add_subdirectory(tests)
endif()
# Mini applications
add_subdirectory(miniapps)