Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to disable clang warnings in iOS build
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.
What values do you want to disable ?
@SGaist currently my QMAKE_CXXFLAGS contain
mostly for macro-generated code.
Can you show your .pro file ?
@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
disable_warning.name = GCC_WARN_64_TO_32_BIT_CONVERSION disable_warning.value = NO QMAKE_MAC_XCODE_SETTINGS += disable_warning
@ekkescorner This is not working, "-Wall" will still override those settings.