[QBS] How to generate 2 objects from the same source file

Christian Kandeler christian.kandeler at qt.io
Thu Jul 28 15:20:46 CEST 2016


On 07/28/2016 03:07 PM, Ch'Gans wrote:
> For testing the clang DB generator[1] I would like to generate 2
> objects from the same source file (clang tools should normally check
> the same source file twice with the 2 different compile commands).
>
> Is there a simple way to do that?
> To keep it simple i would like first.o and second.o to be generated
> with different preprocessor flags.

You can
     - put the files into different products or
     - make a copy of the file or
     - parameterize the respective properties (e.g. cpp.defines)
       and call the generate command twice with different values
       for that parameter.


Christian




More information about the Qbs mailing list