aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 0fdbe0cc1733cfcd1ce06ab5afa6d87e51530341 (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
28
29
30
cmake_minimum_required(VERSION 3.15...4.0)

project(dir_monitor
    LANGUAGES C
)

set(SOURCE_DM src/dir_monitor.c)

add_executable(dir_monitor ${SOURCE_DM})

add_executable(dir_monitor_debug ${SOURCE_DM})
target_compile_options(dir_monitor_debug PUBLIC -g -DDEBUGBUILD)

add_executable(dir_monitor_debug_asan ${SOURCE_DM})
target_compile_options(dir_monitor_debug_asan PUBLIC -g -DDEBUGBUILD -fsanitize=address)
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)


# bin/dir_monitor: bin $(source)
#        gcc -o $@ $(source) -O2
# bin/dir_monitor_debug: bin $(source)
#        gcc -o $@ $(source) -g -DDEBUGBUILD
# bin/dir_monitor_debug_asan: bin $(source)
#        gcc -o $@ $(source) -g -DDEBUGBUILD -fsanitize=address
# bin/dir_monitor_asan: bin $(source)
#        gcc -o $@ $(source) -g -fsanitize=address