Only set flags on compilers that recognize them

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Thomas Arp
2026-04-22 22:47:17 +02:00
committed by GitHub
parent 83d109e7ae
commit 48030f3c2f

View File

@@ -34,11 +34,14 @@ set(TEST_INCLUDES
# Suppress warnings that fire in generated stubs / vendored code and in the
# mud sources when compiled outside their normal full-build context.
set(TEST_CFLAGS
set(TEST_CFLAGS)
if(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$")
list(APPEND TEST_CFLAGS
-Wno-unused-parameter
-Wno-unused-function
-Wno-unused-variable
)
endif()
# Helper macro: add_mud_test(name SRC1 [SRC2 …])
# Creates an executable, registers it with CTest.