blob: 0e9238aca6e8e63b6251cef7d43c6a468868ed50 (
plain) (
blame)
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
|
cmake_minimum_required(VERSION 3.15...4.0)
project(dir_monitor
LANGUAGES C
)
# Although C11 would be sufficient, be safe to set this minimum in order to
# prevent errors from unbeknown features, used to and assuming to be there longer...
set (CMAKE_C_STANDARD 17)
add_compile_options(-Wall)
set(SOURCE_DM src/dir_monitor.c)
add_executable(dir_monitor_debug ${SOURCE_DM})
target_compile_options(dir_monitor_debug PUBLIC -g -DDEBUGBUILD -Werror)
add_executable(dir_monitor_debug_asan ${SOURCE_DM})
target_compile_options(dir_monitor_debug_asan PUBLIC -g -DDEBUGBUILD -fsanitize=address -Werror)
target_link_libraries(dir_monitor_debug_asan asan)
add_executable(dir_monitor_asan ${SOURCE_DM})
target_compile_options(dir_monitor_asan PUBLIC -fsanitize=address)
target_link_libraries(dir_monitor_asan asan)
add_executable(dir_monitor ${SOURCE_DM})
|