-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
50 lines (39 loc) · 1.52 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
cmake_minimum_required(VERSION 3.16)
project(swimps VERSION 0.0.1 LANGUAGES CXX)
enable_testing()
add_compile_options(-Wall -Wextra -pedantic -Werror)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fsanitize=undefined -fno-omit-frame-pointer -g3")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=undefined -fno-omit-frame-pointer -g3")
option(SWIMPS_ENABLE_COVERAGE "Enable code coverage flags." OFF)
if(SWIMPS_ENABLE_COVERAGE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
link_libraries(gcov)
endif()
include(FetchContent)
FetchContent_Declare(
libsignalsafe
GIT_REPOSITORY https://github.com/OMGtechy/libsignalsafe.git
GIT_TAG c1e1b113cecb4ebd4433834ac4b375ddfdfd9b6e
)
FetchContent_MakeAvailable(libsignalsafe)
include(FetchContent)
FetchContent_Declare(
libsamplerpreload
GIT_REPOSITORY https://github.com/OMGtechy/libsamplerpreload.git
GIT_TAG 6c2862a964ed028677be89c999bb8d2e7da1c695
)
FetchContent_MakeAvailable(libsamplerpreload)
add_subdirectory(swimps-test)
add_subdirectory(swimps-analysis)
add_subdirectory(swimps-option)
add_subdirectory(swimps-log)
add_subdirectory(swimps-profile)
add_subdirectory(swimps-error)
add_subdirectory(swimps-trace)
add_subdirectory(swimps-trace-file)
add_subdirectory(swimps-tui)
add_subdirectory(swimps-assert)
add_executable(swimps source/swimps.cpp)
target_link_libraries(swimps PRIVATE swimps-profile swimps-option swimps-analysis swimps-trace-file swimps-tui)