-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
46 lines (35 loc) · 1.11 KB
/
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
37
38
39
40
41
42
43
44
45
46
cmake_minimum_required (VERSION 3.20)
project(rgri)
string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}" is_top_level)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
option(BUILD_DOCS "Build Sphinx documentation" OFF)
option(ENABLE_BINSPARSE "Enable binsparse file parsing" OFF)
add_subdirectory(include)
include(FetchContent)
if (ENABLE_BINSPARSE)
FetchContent_Declare(
binsparse
GIT_REPOSITORY https://github.com/GraphBLAS/binsparse-reference-impl.git
GIT_TAG main)
FetchContent_MakeAvailable(binsparse)
target_link_libraries(rgri INTERFACE binsparse)
endif()
if (is_top_level)
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 10.1.1)
FetchContent_MakeAvailable(fmt)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.4.0 # or a later release
)
FetchContent_MakeAvailable(Catch2)
add_subdirectory(examples)
add_subdirectory(tests)
if (BUILD_DOCS)
add_subdirectory(docs)
endif()
endif()