How to disable clang warnings in iOS build
-
wrote on 8 Oct 2018, 14:47 last edited by
Hi,
I am unable to disable certain compilation warnings when building for iOS. I added various -Wno-... options to QMAKE_CXXFLAGS. However, qmake always adds -Wall at the end of the command line, so all my extra flags are ignored. This seems to happen on every project. Where does this come from and how can I fix this?
I am currently using Qt 5.11.2 and Qt Creator 4.7.1
Thanks a lot.
-
Hi,
What values do you want to disable ?
-
wrote on 9 Oct 2018, 06:19 last edited by
@SGaist currently my QMAKE_CXXFLAGS contain
-Wno-unused-local-typedefs
-Wno-ignored-qualifiers
-Wno-unused-function
-Wno-unused-but-set-parameter
mostly for macro-generated code. -
Can you show your .pro file ?
-
wrote on 10 Oct 2018, 06:22 last edited by
@SGaist This happens with every .pro file. You can check this with any example. "-Wall" will always be added near the end of the clang command line after the QMAKE_CXXFLAGS.
-
@SGaist This happens with every .pro file. You can check this with any example. "-Wall" will always be added near the end of the clang command line after the QMAKE_CXXFLAGS.
@Andreas-E. some time ago I had many unwanted warnings from iOS build and this was the way to suppress them
.pro:disable_warning.name = GCC_WARN_64_TO_32_BIT_CONVERSION disable_warning.value = NO QMAKE_MAC_XCODE_SETTINGS += disable_warning
-
@Andreas-E. some time ago I had many unwanted warnings from iOS build and this was the way to suppress them
.pro:disable_warning.name = GCC_WARN_64_TO_32_BIT_CONVERSION disable_warning.value = NO QMAKE_MAC_XCODE_SETTINGS += disable_warning
wrote on 10 Oct 2018, 09:01 last edited by@ekkescorner This is not working, "-Wall" will still override those settings.
1/7