From c55a69c01029cdfed380d1c2d826dfee4eda80b4 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Fri, 5 Aug 2022 09:00:03 +0200 Subject: [PATCH] build: Fix objc not having certain warning flags --- cmake/build_helpers.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index c16dc5d24..6c7a09248 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -369,5 +369,9 @@ function(downloadImHexPatternsFiles dest) endfunction() macro(setupCompilerWarnings target) - target_compile_options(${target} PRIVATE -Wall -Wextra -Werror -Wno-restrict -Wno-stringop-overread) + set(DEFAULT_FLAGS "-Wall -Wextra -Werror -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}") endmacro() \ No newline at end of file