Search code examples
qmakeqbs

Qbs analogue of qmake system() command


in qmake, there is system() function, which simply runs commands you pass at compile time. The question is: is there any qbs analogue of it? Qbs Rule/Artifact approach is designed for different purpose and is too verbose for simple use cases


Solution

  • qmake's system() function does not run commands at compile time, but at configure time, which is different.

    Please keep in mind that qmake and qbs are two very different build systems with fundamentally different designs and capabilities, and qbs' verbosity is in part due to its fundamental architectural differences which make it far more powerful than qmake will ever be capable of.

    That said, the rough equivalent in qbs is the Process service, which you can invoke from a Rule's outputArtifacts or prepare scripts, or from the right hand side of a property binding (although for performance reasons this is not recommended).

    What exactly is your use case? You might be seeking the wrong mechanism in the first place...