aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 163f941..f9e3ad8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,9 @@ project(dir_monitor
# prevent errors from unbeknown features, used to and assuming to be there longer...
set (CMAKE_C_STANDARD 17)
-add_compile_options(-Wall)
+add_compile_options(-Wall -Wextra -Wformat -Wformat=2 -Wconversion -Wimplicit-fallthrough -Werror=format-security
+ -Wbidi-chars=any -Werror=implicit -Werror=incompatible-pointer-types -Werror=int-conversion
+ -fno-delete-null-pointer-checks -fstack-clash-protection -fstack-protector-strong -fstrict-flex-arrays=3)
set(SOURCE_DM src/dir_monitor.c src/list_management.c src/options.c src/output.c)
@@ -28,5 +30,5 @@ target_link_libraries(dir_monitor_asan asan)
add_executable(dir_monitor ${SOURCE_DM})
target_include_directories(dir_monitor PRIVATE include)
-target_compile_options(dir_monitor_debug PUBLIC -O2 -Werror)
+target_compile_options(dir_monitor PUBLIC -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -FPIE -pie -Wl,-z,noexecstack -Wl,--as-needed -Wl,--no-copy-dt-needed-entries)