Results 1 to 2 of 2

Thread: Optimization specifics with qmake

  1. #1
    Join Date
    Jan 2006
    Posts
    70
    Thanks
    13
    Thanked 5 Times in 5 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Optimization specifics with qmake

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Optimization specifics with qmake

    Quote Originally Posted by bitChanger
    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).

Similar Threads

  1. Setting up qmake to run "Hello World"
    By Rolsch in forum Newbie
    Replies: 2
    Last Post: 27th May 2006, 02:37
  2. Replies: 5
    Last Post: 13th March 2006, 20:22
  3. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11
  4. Qt 4.1.1, no use of uic with qmake?
    By Morea in forum Newbie
    Replies: 2
    Last Post: 28th February 2006, 21:42
  5. make install equivalent in qmake ...
    By momesana in forum Newbie
    Replies: 3
    Last Post: 20th February 2006, 21:46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.