fix warning: no -Wno-pedantic-ms-format for llvm mingw

ONLY gcc has `-Wno-pedantic-ms-format`:

https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wno-pedantic-ms-format
This commit is contained in:
valord577 2025-02-07 15:51:26 +08:00 committed by GitHub
parent c628ac4d95
commit 4cb89e6128
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -325,7 +325,7 @@ if(FLAG_VISIBILITY)
endif()
set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -fvisibility=hidden")
endif()
if(MINGW)
if(MINGW AND ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU"))
# Without __USE_MINGW_ANSI_STDIO the compiler produces a false positive
set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -Wno-pedantic-ms-format")
endif()