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)