--- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -219,12 +219,6 @@ else () set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -DUNICODE -DWCHAR_INCOMPATIBLE_XMLCH ${CMAKE_WXWINDOWS_CXX_FLAGS}") - if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") - # TODO: with the below flag the Mac and BSD cmake-based builds fail with an error such as: - # clang: error: argument unused during compilation: '-fstack-clash-protection' - # it's possible check_cxx_compiler_flag is using the wrong compiler for the check? - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") - endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -DDEBUG") if (USE_ASAN) set(CMAKE_CXX_FLAGS_DEBUG --- a/CMakeModules/harden/harden-gcc.cmake +++ b/CMakeModules/harden/harden-gcc.cmake @@ -42,7 +42,6 @@ harden_add_compile_option(-Wformat HARDEN_COMPILE_WFORMAT FALSE) harden_add_compile_option(-Wformat-security HARDEN_COMPILE_WFORMAT_SECURITY FALSE) -harden_add_compile_option(-Werror=format-security HARDEN_COMPILE_WERROR_FORMAT_SECURITY FALSE) harden_add_compile_option(-fstack-clash-protection HARDEN_COMPILE_STACK_CLASH_PROTECTION FALSE) option(HARDEN_USE_SAFE_STACK "Enable the SafeStack sanitizer" ON)