cmake: Slience bening warnings in 3rdparty code
Change-Id: I1a47695abd6d6ea1527e2803dde0ed29aca014cc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
76d02d895a
commit
21d9384800
@ -38,10 +38,11 @@ if (QT_FEATURE_gui)
|
||||
set(QT_QPA_DEFAULT_PLATFORM "${_default_platform}" CACHE STRING "QPA default platform")
|
||||
endif()
|
||||
|
||||
# Silence warnings in 3rdparty code
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
set_source_files_properties(../3rdparty/md4c/md4c.c PROPERTIES COMPILE_FLAGS "-Wno-error=unused-parameter -Wno-error=sign-compare -Wno-error=missing-field-initializers")
|
||||
set_source_files_properties(../3rdparty/md4c/md4c.c PROPERTIES COMPILE_FLAGS "-Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers")
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
|
||||
set_source_files_properties(../3rdparty/md4c/md4c.c PROPERTIES COMPILE_FLAGS "-Wno-error=unused-parameter -Wno-error=sign-compare -Wno-error=missing-field-initializers -Wno-error=missing-braces")
|
||||
set_source_files_properties(../3rdparty/md4c/md4c.c PROPERTIES COMPILE_FLAGS "-Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers -Wno-missing-braces")
|
||||
endif()
|
||||
|
||||
unset(qmake_module_config)
|
||||
|
@ -87,5 +87,13 @@ qt_extend_target(QJpegPlugin CONDITION NOT QT_FEATURE_system_jpeg
|
||||
../../../3rdparty/libjpeg/src
|
||||
)
|
||||
|
||||
# special case begin
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU"
|
||||
OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"
|
||||
OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
|
||||
target_compile_options(QJpegPlugin PRIVATE "-Wno-unused-parameter")
|
||||
endif()
|
||||
# special case end
|
||||
|
||||
#### Keys ignored in scope 5:.:../../../3rdparty:../../../3rdparty/libjpeg.pri:GCC:
|
||||
# QMAKE_CFLAGS_WARN_ON = "-Wno-unused-parameter" "-Wno-main"
|
||||
|
Loading…
Reference in New Issue
Block a user