I compile my Qt5-based project with warnings enabled on g++:
# project.pro file
QMAKE_CXXFLAGS += -std=c++11 -Wall -Wextra -Wconversion -Weffc++
When compiling, Qt produces lots of warnings (1000+ with just one simple widget), hiding the warnings from my code.
How to tell qmake to use the -isystem
switch when specifying the Qt's headers rather than -I
to suppress the warnings? I don't want to turn warnings off I want to keep them for my code.
NOTE: I checked this SO question but it does not work in my case, it might be only for Qt4, I use Qt5.
NOTE 2: this is an acknowledged bug, I am looking for a workaround. I use a recent version of qmake compiled from sources 5.4.1, this version passes system headers from /include
and /usr/include
as system headers but not the Qt's headers.
NOTE 3: I know CMake would work but this is not an option for me.