Skip to content

Commit

Permalink
cmake: build with _FORTIFY_SOURCE=2 on debug builds
Browse files Browse the repository at this point in the history
  • Loading branch information
kevans91 committed Jul 16, 2024
1 parent 8f84043 commit 9e693a5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ option(BUILD_DRIVER "Build the orch(1) driver" ON)

set(warnings "-Wall -Wextra -Werror")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_options(-D_FORTIFY_SOURCE=2)
add_compile_options(-fsanitize=address,undefined -fstrict-aliasing)
add_link_options(-fsanitize=address,undefined -fstrict-aliasing)
endif()
Expand Down

0 comments on commit 9e693a5

Please sign in to comment.