diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2017-12-12 09:18:57 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2017-12-12 14:39:44 +0000 |
commit | 91f63908df560e0ed22cad12ba6cc43f81d60f9f (patch) | |
tree | 7bbf95e894d335cb32a32a1fdf06ad5a6230af3f /CMakeLists.txt | |
parent | 621498f88e882dbe8cc3a2c8373bb342bb0dbe77 (diff) | |
download | wireshark-91f63908df560e0ed22cad12ba6cc43f81d60f9f.tar.gz wireshark-91f63908df560e0ed22cad12ba6cc43f81d60f9f.tar.bz2 wireshark-91f63908df560e0ed22cad12ba6cc43f81d60f9f.zip |
cmake: Remove -Wcomma for C++ when using Qt >= 5.10
The Qt team introduced a lot of "Possible misuse of comma operator here"
warnings in qstring.h and qstringview.h in version 5.10. Now we need to
fix the Qt source again.
Change-Id: I948ba5a224d4dca1ebb6a758100c064d501c1d4a
Reviewed-on: https://code.wireshark.org/review/24779
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3231e29be6..e3bd66d4ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -464,7 +464,6 @@ else() -Wno-overlength-strings -Wno-long-long -Wheader-guard - -Wcomma ) # @@ -517,6 +516,11 @@ else() # -Wimplicit-function-declaration into an error by default. # -Werror=implicit + # + # The Qt headers in version 5.10 introduced a lot of + # "Possible misuse of comma operator here" warnings. + # + -Wcomma ) set(CXX_WARN_FLAGS @@ -530,6 +534,13 @@ else() -Wshorten-64-to-32 ) endif() + if (Qt5Core_VERSION VERSION_LESS 5.10) + # The Qt headers in version 5.10 introduced a lot of + # "Possible misuse of comma operator here" warnings. + set(CXX_WARN_FLAGS ${CXX_WARN_FLAGS} + -Wcomma + ) + endif() # # These are not enabled by default, because the warnings they |