commit 2ed43bd3a0bd95d53d0ddbe8894be45abd5d33f0 parent c262e6f0641bfe09e54f70ad8f2e555bdc8d7678 Author: Frederic Cambus <fred@statdns.com> Date: Fri, 23 Oct 2020 22:25:57 +0200 Only enable FORTIFY_SOURCE level 2 for release builds. Diffstat:
M | CMakeLists.txt | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -33,7 +33,8 @@ if(NOT HAVE_REALLOCARRAY) set (SRC ${SRC} compat/reallocarray.c) endif() -add_definitions(-D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -std=c99 -pedantic) +set(CMAKE_C_FLAGS_RELEASE "-D_FORTIFY_SOURCE=2") +add_definitions(-D_GNU_SOURCE -Wall -Wextra -std=c99 -pedantic) add_library(ansilove SHARED ${SRC} ${LOADERS}) target_link_libraries(ansilove ${GD_LIBRARIES} m)