From 5cb326f95b719813f34f74adca74ce84779ef521 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Fri, 5 Aug 2022 09:16:16 +0200 Subject: [PATCH] build: Remove more warnings from ObjC compiler --- cmake/build_helpers.cmake | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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