From 1dcf1a41c5734845b452ae915a18f2fae2465698 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 3 Sep 2022 11:31:49 +0100 Subject: [PATCH] Turn -Wall back off for clang-based Windows builds. Unfortunately, it gives an absolutely huge number of warnings, and it wouldn't be feasible to fix them all without risking introducing further bugs. Perhaps _after_ the next release branch it might be worth looking at some of them, but I don't think fixing them right now is viable. I've left it on for actual gcc, though, since the MinGW build seems OK with it. --- cmake/platforms/windows.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmake/platforms/windows.cmake b/cmake/platforms/windows.cmake index f8ab8597..52d2607d 100644 --- a/cmake/platforms/windows.cmake +++ b/cmake/platforms/windows.cmake @@ -102,9 +102,12 @@ else() set(LFLAG_MANIFEST_NO "") endif() -if(STRICT AND (CMAKE_C_COMPILER_ID MATCHES "GNU" OR - CMAKE_C_COMPILER_ID MATCHES "Clang")) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wpointer-arith -Wvla") +if(STRICT) + if(CMAKE_C_COMPILER_ID MATCHES "GNU") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wpointer-arith -Wvla") + elseif(CMAKE_C_COMPILER_ID MATCHES "Clang") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wpointer-arith -Wvla") + endif() endif() if(CMAKE_C_COMPILER_ID MATCHES "MSVC")