From c588d25761e845c60a1713d6ec4064159a1d1414 Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <barracuda@macos-powerpc.org>
Date: Wed, 14 Aug 2024 11:08:10 +0800
Subject: [PATCH 3/3] BcToolboxCMakeUtils.cmake: fix flags for Apple

---
 cmake/BcToolboxCMakeUtils.cmake | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git cmake/BcToolboxCMakeUtils.cmake cmake/BcToolboxCMakeUtils.cmake
index 4a3b8c3..0763a31 100644
--- cmake/BcToolboxCMakeUtils.cmake
+++ cmake/BcToolboxCMakeUtils.cmake
@@ -39,7 +39,10 @@
 			list(APPEND ${CPP_FLAGS} "-Wno-error=pragmas")
 		endif()
 		if(APPLE)
-			list(APPEND ${CPP_FLAGS} "-Wno-error=unknown-warning-option" "-Qunused-arguments" "-Wno-tautological-compare" "-Wno-unused-function" "-Wno-array-bounds")
+			list(APPEND ${CPP_FLAGS} "-Wno-tautological-compare" "-Wno-unused-function" "-Wno-array-bounds")
+			if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
+				list(APPEND ${CPP_FLAGS} "-Wno-discarded-qualifiers")
+			endif()
 		endif()
 		if(ENABLE_STRICT)
 			list(APPEND ${CPP_FLAGS} "-Werror" "-Wextra" "-Wno-unused-parameter" "-Wno-error=unknown-pragmas" "-Wuninitialized" "-Wno-missing-field-initializers"
