diff --git a/CMakeLists.txt b/CMakeLists.txt index bba0828..b1fe7f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,10 +39,11 @@ endmacro(extra_cxx_compiler_flag) # Compiler warnings extra_cxx_compiler_flag("-Wall") extra_cxx_compiler_flag("-Wno-missing-braces") -# Some security flags +extra_cxx_compiler_flag("-Wdate-time") +# Some hardening flags extra_cxx_compiler_flag("-fstack-protector-strong") extra_cxx_compiler_flag("-Wformat") -extra_cxx_compiler_flag("-Werror=format-security") +extra_cxx_compiler_flag("-Wformat -Werror=format-security") extra_cxx_compiler_flag("-D_FORTIFY_SOURCE=2") # Enable the supported flags, but give priority to CXXFLAGS env var set(CMAKE_CXX_FLAGS "${EXTRA_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")