-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
56 lines (47 loc) · 1.29 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
47
48
49
50
51
52
53
54
55
56
cmake_minimum_required(VERSION 3.13)
project(rt_demo)
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
option(ENABLE_CLANG_TIDY "Run clang-tidy" OFF)
add_compile_options(
-Wall
-Wextra
-Wpedantic
-Wshadow
-Wnon-virtual-dtor
-Wpedantic
-Wold-style-cast
-Wcast-align
-Wunused
-Woverloaded-virtual
-Wsign-conversion
-Wmisleading-indentation
-Wduplicated-cond
-Wduplicated-branches
-Wnull-dereference
-Wuseless-cast
-Wdouble-promotion
)
if (ENABLE_CLANG_TIDY)
find_program(CLANG_TIDY clang-tidy clang-tidy-14 clang-tidy-13 clang-tidy-12 clang-tidy-11)
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY})
else()
message(STATUS "Not running clang-tidy. Use ENABLE_CLANG_TIDY=ON to run clang-tidy.")
endif()
# include(FetchContent)
#
# # Disable examples from rt-demo
# set(ENABLE_EXAMPLES OFF)
# FetchContent_Declare(rt-demo
# GIT_REPOSITORY https://github.com/cactusdynamics/rt-demo.git
# GIT_TAG master # FIXME: use a tagged release
# )
#
# FetchContent_MakeAvailable(rt-demo)
add_definitions(-DSPDLOG_ACTIVE_LEVEL=1) # debug level
find_package(spdlog REQUIRED)
find_package(fmt REQUIRED)
find_package(DAQNavi REQUIRED)
add_subdirectory(examples/blink)
add_subdirectory(examples/button)
add_subdirectory(examples/instantai)