diff --git a/CMakeLists.txt b/CMakeLists.txt index f7a7b54..5092f69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -201,7 +201,7 @@ function (add_mimick_test _NAME) if (NOT MSVC) foreach (ARG ${ARGN}) - set_source_files_properties (${ARG} PROPERTIES COMPILE_FLAGS -O0) + set_source_files_properties (${ARG} PROPERTIES COMPILE_FLAGS "-O0 -Wp,-U_FORTIFY_SOURCE") endforeach () endif () diff --git a/sample/strdup/CMakeLists.txt b/sample/strdup/CMakeLists.txt index f04bb9d..594700e 100644 --- a/sample/strdup/CMakeLists.txt +++ b/sample/strdup/CMakeLists.txt @@ -3,7 +3,7 @@ add_executable (strdup_test test.c) target_link_libraries (strdup_test strdup mimick) if (NOT MSVC) - set_source_files_properties (test.c PROPERTIES COMPILE_FLAGS -O0) + set_source_files_properties (test.c PROPERTIES COMPILE_FLAGS "-O0 -Wp,-U_FORTIFY_SOURCE") endif () add_mimick_sample (strdup_test)