From 48030f3c2f1fa4a08a28bf951e63ea89e8f6be6a Mon Sep 17 00:00:00 2001 From: Thomas Arp <357770+welcor@users.noreply.github.com> Date: Wed, 22 Apr 2026 22:47:17 +0200 Subject: [PATCH] Only set flags on compilers that recognize them Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- tests/CMakeLists.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1027283..64b1b7b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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 - -Wno-unused-parameter - -Wno-unused-function - -Wno-unused-variable -) +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.