From 74dbef1552c513038d42972c439c779203311314 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Wed, 20 Sep 2023 18:39:21 +0200 Subject: [PATCH] CMake: Pass -Wno-format with MinGW --- expat/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index d79b9b16..8c37c59e 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -311,6 +311,10 @@ if (EXPAT_WARNINGS_AS_ERRORS) add_definitions(/WX) else() set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -Werror") + if(MINGW) + # To avoid "error: unknown conversion type character ā€˜lā€™ in format [-Werror=format=]" + set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -Wno-format") + endif() endif() endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_COMPILE_FLAGS}")