-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathFindOrFetchSLATE.cmake
More file actions
32 lines (26 loc) · 985 Bytes
/
FindOrFetchSLATE.cmake
File metadata and controls
32 lines (26 loc) · 985 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
30
31
32
# Try find_package
if (NOT TARGET slate)
find_package(slate QUIET CONFIG)
if (TARGET slate)
message(STATUS "Found SLATE CONFIG at ${slate_CONFIG}")
endif (TARGET slate)
endif (NOT TARGET slate)
# If not found, build via FetchContent
if (NOT TARGET slate)
# Make sure BLAS++/LAPACK++ are already in place
# (will typically be loaded from BTAS)
include(${vg_cmake_kit_SOURCE_DIR}/modules/FindOrFetchLinalgPP.cmake)
if (NOT TILEDARRAY_HAS_CUDA)
set(gpu_backend none CACHE STRING "Device Backend for ICL Linalg++/SLATE")
endif (NOT TILEDARRAY_HAS_CUDA)
include(FetchContent)
FetchContent_Declare(
slate
GIT_REPOSITORY https://github.com/icl-utk-edu/slate.git
GIT_TAG ${TA_TRACKED_SLATE_TAG}
)
FetchContent_MakeAvailable(slate)
endif (NOT TARGET slate)
if (NOT TARGET slate)
message( FATAL_ERROR "FindOrFetchSLATE could not make slate target available")
endif (NOT TARGET slate)