[Moved] qmake and pro files question



  • Hello!
    I have Qt SDK 1.1 (installed with online installer) on Windows + MinGW.
    And I have a few misunderstandings with *.pro files usage.

    1. When I use this:
      @CONFIG(release, debug|release) {
      message("in release")
      } else {
      message("in debug")
      }@
      and compile in release mode, I get the following output:
      Project MESSAGE: in release
      Project MESSAGE: in release
      Project MESSAGE: in debug
      Why do I get 3 messages instead of 1? why they are different?
      When I compile in debug mode, I get the following output:
      Project MESSAGE: in debug
      Project MESSAGE: in debug
      Project MESSAGE: in release
    2. From the documentation about CONFIG variable:
      "Since the debug option overrides the release option when both are defined in the CONFIG variable..."
      is it really true?
    3. If I use the syntax
      @<condition> {
      <command or definition>
      }@
      from what sources qmake finds out whether <condition> is true or false, besides CONFIG var?
    4. About a year ago I read an article here that Qt software is considering migration to another build system (e.g. CMake) or developing its own. Are there any news in this area?
      Thanks in advance.


    1. The reason why you get three messages is the following: qmake goes through three stages when generating the Makefile(s) for your project. Once for debug, release and the metamakefile.

    See the description of debug_and_release and build_pass here http://doc.qt.nokia.com/4.7/qmake-variable-reference.html#config for more insight.

    1. Yes its true. :)

    2. http://doc.qt.nokia.com/4.7/qmake-advanced-usage.html#scopes

    3. We're currently investigating. Nothing concrete yet.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.