[Qt-interest] warnings
Sean Harmer
sean.harmer at maps-technology.com
Tue Nov 9 09:54:46 CET 2010
On Tuesday 09 November 2010 08:16:08 Oliver.Knoll at comit.ch wrote:
> On 2010-11-09 John John Weeks wrote:
> > Is there a more nuanced way to control warnings?
>
> Not sure whether there is a "QMake Way" to do that, but you can always pass
> along compiler-specific flags, such as
>
> QMAKE_CXXFLAGS += -Wall -Woverloaded-virtual -Wno-deprecated
> -Wuninitialized -W...
>
> (example for gcc)
>
> This way you can enable/disable the warnings you'd like to see.
Going further with this you can also make your own mkspec which can be worth
it if you will be using it many times or across different projects. Just copy
the mkspec that you normally use and edit it to pass in the compiler warning
options as Oliver suggested.
Then when you run qmake use a command line something like this:
qmake -spec my-special-warnings-mkspec
HTH,
Sean
More information about the Qt-interest-old
mailing list