aboutsummaryrefslogtreecommitdiff
path: root/Monitor/CMakeLists.txt
blob: ed5004a7cafd0f7411848e94f6bdcb50ec0613ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
cmake_minimum_required(VERSION 3.21)
project(Monitor C CXX)

set(CMAKE_C_STANDARD 99)
IF (CMAKE_BUILD_TYPE MATCHES Debug)
    add_compile_definitions(TD_USE_ASAN)
ENDIF (CMAKE_BUILD_TYPE MATCHES Debug)
add_subdirectory(td)

set(CMAKE_C_FLAGS_DEBUG
        "${CMAKE_C_FLAGS_DEBUG} -g3 -O0 -fsanitize=address")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG
        "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fsanitize=address")
add_definitions(-D_POSIX_C_SOURCE=200809L)

add_executable(Monitor
        main.c
        )
target_include_directories(Monitor PUBLIC "${PROJECT_BINARY_DIR}")
target_link_libraries(Monitor PRIVATE tdc)