PDA

View Full Version : Optimization specifics with qmake



bitChanger
29th August 2006, 17:42
I have a project that I'm compiling with MSVC 6.0 that contains a large number of files. Some of these files I would like to compile with fast speed optimization and some with small size optimization. So by right clicking on each file I can give specific optimization on a per file basis.

When the project needs updated by changing the .ui file and calling qmake, the default optimization is set for all files, changing all of the settings I made.

Is there a way to specify optimization on a per file basis in the .pro file for qmake? If not, is there a way to specify optimization on all files?

Thanks.

wysota
29th August 2006, 17:55
Is there a way to specify optimization on a per file basis in the .pro file for qmake?
Yes, but only is you compile them as separate subprojects (with all files within a subproject inheriting the same optimisations). I think you should have those subprojects set as static libraries and then create another subproject which will link all the remaining ones together into a resulting application.


If not, is there a way to specify optimization on all files?
Yes, change appropriate variables in your project file (see qmake docs for details).