From f811633485c1fb8ab44f519cd588d5154cd454aa Mon Sep 17 00:00:00 2001 From: Iwan Kawrakow Date: Tue, 17 Sep 2024 13:18:42 +0200 Subject: [PATCH] Disable c99-extensions warning only for APPLE --- ggml/src/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ggml/src/CMakeLists.txt b/ggml/src/CMakeLists.txt index bb633739..600acf91 100644 --- a/ggml/src/CMakeLists.txt +++ b/ggml/src/CMakeLists.txt @@ -934,7 +934,11 @@ endif() if (GGML_ALL_WARNINGS) if (NOT MSVC) - list(APPEND WARNING_FLAGS -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-c99-extensions) + list(APPEND WARNING_FLAGS -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function) + if (APPLE) + # shut up c99 extensions warning I get on my system due to arm_neon.h + list(APPEND WARNING_FLAGS -Wno-c99-extensions) + endif() list(APPEND C_FLAGS -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Werror=implicit-function-declaration) list(APPEND CXX_FLAGS -Wmissing-declarations -Wmissing-noreturn)