Disable clang "range loop analysis" compiler warning

See: https://github.com/qbittorrent/qBittorrent/pull/13915#issuecomment-739449084
This commit is contained in:
Chocobo1 2021-01-06 12:04:11 +08:00 committed by sledgehammer999
parent be929ed88c
commit d431ecbe00
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2
2 changed files with 8 additions and 0 deletions

View file

@ -59,6 +59,12 @@ macro(qbt_common_config)
endif()
endif()
if ((CXX_COMPILER_ID STREQUAL "Clang") OR (CXX_COMPILER_ID STREQUAL "AppleClang"))
target_compile_options(qbt_common_cfg INTERFACE
-Wno-range-loop-analysis
)
endif()
if (MINGW)
target_link_options(qbt_common_cfg INTERFACE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:LINKER:--dynamicbase>)
endif()

View file

@ -9,6 +9,8 @@ unix:!macx: include(../unixconf.pri)
QT += network xml
macx|*-clang*: QMAKE_CXXFLAGS_WARN_ON += -Wno-range-loop-analysis
nogui {
TARGET = qbittorrent-nox
QT -= gui