From d770dfea36dcbe8d63ad0819e796d180ab2ea638 Mon Sep 17 00:00:00 2001 --- cmake/build_configurations/compiler_options.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/build_configurations/compiler_options.cmake b/cmake/build_configurations/compiler_options.cmake index a319983..aea15a3 100644 --- a/cmake/build_configurations/compiler_options.cmake +++ b/cmake/build_configurations/compiler_options.cmake @@ -45,6 +45,7 @@ IF(UNIX) # Default GCC flags IF(MY_COMPILER_IS_GNU) SET(COMMON_C_FLAGS "-fno-omit-frame-pointer") + SET(COMMON_C_FLAGS "-fstack-protector-strong") # Disable inline optimizations for valgrind testing to avoid false positives IF(WITH_VALGRIND) STRING_PREPEND(COMMON_C_FLAGS "-fno-inline ") @@ -55,6 +56,7 @@ IF(UNIX) ENDIF() SET(COMMON_CXX_FLAGS "-std=c++14 -fno-omit-frame-pointer") + SET(COMMON_CXX_FLAGS "-fstack-protector-strong") # Disable inline optimizations for valgrind testing to avoid false positives IF(WITH_VALGRIND) STRING_PREPEND(COMMON_CXX_FLAGS "-fno-inline ") -- 2.23.0