diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index 6c7a09248..b7f8ff517 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -369,9 +369,10 @@ function(downloadImHexPatternsFiles dest) endfunction() macro(setupCompilerWarnings target) - set(DEFAULT_FLAGS "-Wall -Wextra -Werror -Wno-stringop-overread") + set(IMHEX_COMMON_FLAGS "-Wall -Wextra -Werror") + set(IMHEX_C_FLAGS "${IMHEX_COMMON_FLAGS} -Wno-restrict -Wno-stringop-overread") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DEFAULT_FLAGS} -Wno-restrict") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DEFAULT_FLAGS} -Wno-restrict") - set(CMAKE_OBJC_FLAGS "${CMAKE_OBJC_FLAGS} ${DEFAULT_FLAGS}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${IMHEX_C_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IMHEX_C_FLAGS}") + set(CMAKE_OBJC_FLAGS "${CMAKE_OBJC_FLAGS} ${IMHEX_COMMON_FLAGS}") endmacro() \ No newline at end of file