[Qt-interest] doubt about the qmake makespec

Raghavendra Nayak raghunayak at ymail.com
Mon Feb 9 19:01:54 CET 2009


Hi all,

This is my first post in this mailing list. I have a doubt regarding qmake default settings ie; qmake.conf

If you check qmake.conf present inside the makespecs directory of qt installation directory, you will see that qmake.conf of all makespecs which use gcc as the compiler has following line in them

QMAKE_CFLAGS_RELEASE    += -O2

This line is used to set the optimization level of the release binary. In this case O2 optimization will be used for release build.

My question is that, why highest possible optimization -O3 is not used by default ? Why -O2 is used instead as the default optimization ? Whether O2 setting is selected simply or there is any particular reason behind this ? I am planning to use O3 setting for my release binaries, is there any problem with this ?

Also, How I can change this just for my project w/o affecting platform/compiler independence ? ie; What lines I should add to my qmake pro files or pri files?

Please reply if you know the answer to any of these question.

Thank you.

With Regards,

Raghavendra Nayak



      Get perfect Email ID for your Resume. Grab now http://in.promos.yahoo.com/address




More information about the Qt-interest-old mailing list