Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Automatic project file parsing VS qmaking manually
Forum Updated to NodeBB v4.3 + New Features

Automatic project file parsing VS qmaking manually

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
3 Posts 3 Posters 930 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    scouture
    wrote on last edited by scouture
    #1

    Does anyone know why I don't get the same output when QT Creator parse the project files (.pro) and it's subdirs versus when I run manually qmake on the main project file?

    I wonder if I can detect it my pro (or pri) file. The reason why I want to do that, is that my pri files tells the programmers to changes some settings if it detects an error. When I manually run qmake, the qmaking process is stop on the first error("my message to programmers"). But when the project is loaded, the error message is written for all the subdirs in the General Messages outputs. Is there a way to control what is send to General Messages vs what is in Compile Output.

    Is there a way to know that qmake was called by QTCreator or by me? I tried using QMAKE_ARGS. I found that no arguments are written when executed by QTCreator. This is the only I found a different behavior...

    Thank you!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Can you show a minimal .pro/.pri file that triggers this behaviour ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • hungerH Offline
        hungerH Offline
        hunger
        wrote on last edited by
        #3

        Creator does not call qmake to get the project data. It just uses the same parser that is built into qmake -- but in a different way. Creator will basically parse your .pro-file twice. Once it does something very similar to what happens when you run qmake. The second time it basically ignores all conditions to get all the files that belong to the project but are not built in the current configuration. Think foo_unix.cpp on Windows or foo_windows.cpp on Mac. Creator will not create files in both nodes!

        So Creator should only trigger one error in exact mode and all of them in inexact mode.

        When you start to build your project, then Creator will run the real qmake and at that point you should get the warnings as you expect them.

        1 Reply Last reply
        2

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved