Results 1 to 3 of 3

Thread: Set Debug or Relase build options in Xcode instead of .pro file?

  1. #1
    Join Date
    Jul 2007
    Posts
    56
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Set Debug or Relase build options in Xcode instead of .pro file?

    I have a project that I compile on the Mac in XCode. I make the XCode project from the .pro file using "qmake -spec macx-xcode .....pro".

    XCode has Project -> Build Configurations for Release and Debug in the Project menu.

    I was wondering if it is possible to get the XCode project to be configured for *both* the debug and build version from the .pro file SIMULTANEOUSLY?

    i.e. Instead of having to specify CONFIG += release or CONFIG += debug in my .pro file and then having to rebuild the XCode project each time from the .pro file, it would make both debug and release project configurations for XCode. Then I only need to select which one I want from the XCode Projects -> Build Configurations menu.

    In my .pro file I have sections like the following which define the build options, based on the
    Qt Code:
    1. CONFIG += release
    To copy to clipboard, switch view to plain text mode 
    or
    Qt Code:
    1. CONFIG += debug
    To copy to clipboard, switch view to plain text mode 
    defined earlier in the .pro file.

    Qt Code:
    1. CONFIG(debug, debug|release) {
    2. # here comes debug specific statements
    3. } else {
    4. # here comes release specific statements
    5. DEFINES += QT_NO_DEBUG_OUTPUT
    6. }
    To copy to clipboard, switch view to plain text mode 

    Is that possible to do? I don't want to edit the XCode project files to have specific options for debug/release because they get destroyed each time I regenerate the project from the .pro file.

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Set Debug or Relase build options in Xcode instead of .pro file?

    try CONFIG += debug_and_release

  3. #3
    Join Date
    Jul 2007
    Posts
    56
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Set Debug or Relase build options in Xcode instead of .pro file?

    Do you mean use this:
    Qt Code:
    1. CONFIG += debug_and_release
    2.  
    3. CONFIG(debug, debug|release) {
    4. # here comes debug specific statements
    5. } else {
    6. # here comes release specific statements
    7. DEFINES += QT_NO_DEBUG_OUTPUT
    8. }
    To copy to clipboard, switch view to plain text mode 

    I tried that but the release build of my app (when built with the release version selected in XCode) still outputs qDebug() stuff so it looks like its not making both configurations.
    Last edited by will49; 8th November 2007 at 21:24.

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.