[Qbs] Multiple "favored" binaries from one product

Thomas Ballenthin thomas at anhelo.de
Thu May 4 16:19:15 CEST 2017


I'm currently building my unit tests each as individual CppApplication. This works fine as it is. But now I'm facing the problem to build each unit test twice with different compiler options per set.
As I understand, each product outputs a single file. What is the most convenient way to produce two binaries with different compiler switches from the same source files? 
I would like to reduce code duplication and not specify several CppApplications per unit test. Is there a way to have a "product factory", or rules that process groups of files and output binaries.

Would it be possible to generate the required products with Javascript?

What I'm looking for is "gradle flavor"-like behavior: https://docs.gradle.org/current/userguide/native_software.html#native_binaries:flavor


More information about the Qbs mailing list