Disable format warnings when building with MinGW
This commit is contained in:
parent
939b31ae3d
commit
10159208e1
|
@ -426,7 +426,6 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|||
-W
|
||||
-Wcast-align
|
||||
-Wfloat-equal
|
||||
-Wformat-security
|
||||
-Wmissing-format-attribute
|
||||
-Wpointer-arith
|
||||
-Wredundant-decls
|
||||
|
@ -440,6 +439,14 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|||
-Winit-self)
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
# Disable excessive warnings since we're using __USE_MINGW_ANSI_STDIO
|
||||
# Hopefully, any potential issues will be spotted on other platforms
|
||||
list(APPEND NEEDED_COMPILER_FLAGS -Wno-format)
|
||||
else()
|
||||
list(APPEND NEEDED_COMPILER_FLAGS -Wformat-security)
|
||||
endif()
|
||||
|
||||
set(NEEDED_C_COMPILER_FLAGS
|
||||
${NEEDED_COMPILER_FLAGS}
|
||||
-Winline
|
||||
|
|
Loading…
Reference in New Issue