summaryrefslogtreecommitdiff
path: root/expat/CMakeLists.txt
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2021-04-20 19:01:30 +0200
committerSebastian Pipping <sebastian@pipping.org>2021-05-07 18:25:07 +0200
commit1e053c698b7ff8f7b4cc3c7c6e9945b72c3d5286 (patch)
tree850fa1cc40b1012bde460bdf4b267855f0da358e /expat/CMakeLists.txt
parent3120b86447defee11d11bb9e78e49311f3307324 (diff)
downloadlibexpat-git-1e053c698b7ff8f7b4cc3c7c6e9945b72c3d5286.tar.gz
Autotools|CMake: Suppress -Wpedantic-ms-format false positives
Addresses warning: ISO C does not support the ‘I64’ ms_printf length modifier. It seems correct and relevant with __USE_MINGW_ANSI_STDIO, only. And -Werror doesn't tolerate false positives...
Diffstat (limited to 'expat/CMakeLists.txt')
-rw-r--r--expat/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt
index 951df0ed..96ac5daa 100644
--- a/expat/CMakeLists.txt
+++ b/expat/CMakeLists.txt
@@ -248,6 +248,10 @@ if(FLAG_VISIBILITY)
add_definitions(-DXML_ENABLE_VISIBILITY=1)
set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -fvisibility=hidden")
endif()
+if(MINGW)
+ # Without __USE_MINGW_ANSI_STDIO the compiler produces a false positive
+ set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -Wno-pedantic-ms-format")
+endif()
if (EXPAT_WARNINGS_AS_ERRORS)
if(MSVC)
add_definitions(/WX)