[QBS] Setting multiple profiles for sub-projects

Jake Petroules jake.petroules at petroules.com
Sun Aug 9 22:39:01 CEST 2015


> On Aug 9, 2015, at 10:19 AM, Stephan Gatzka <stephan.gatzka at gmail.com> wrote:
> 
> Hi!
> 
> I setup successfully qbs to build my cjet project. For continuous 
> integration I'd like to setup a "surrounding" qbs file which sets the 
> profiles the cjet project:
> 
> Project {
>   name: "cjet CI"
>   minimumQbsVersion: "1.4.0"
> 
>   SubProject {
>     filePath: "cjet.qbs"
>     Properties {
>       name: "cjet"
>       profiles: ["gcc", "clang"]
>     }
>   }
> 
>   Product {
>     name: "cjet continuous integration"
>     Depends { name: "cjet" }
>     profiles: ["gcc", "clang"]
>   }
> }
> 
> 
> If I use this file. I get the error:
> Product dependency 'cjet' not found for profile 'gcc'.
> 
> So it only seem to work if I also set profiles in the cjet.qbs file. But 
> that is something I didn't want to because I often have to cross compile 
> this program and don't know the profile beforehand.
> 
> Nevertheless, for a continuous build a selection of some pre-defined 
> profiles would be helpful. Is that possible to be specified in a qbs 
> file like above or do I have to run qbs repeatedly with different profiles?
> 
> Regards,
> 
> Stephan
> _______________________________________________
> QBS mailing list
> QBS at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs


You can invoke qbs like this:

	qbs build debug profile:gcc debug profile:clang

...and qbs will build your project for both the gcc and clang profiles, in parallel. You can specify as many variant+property combinations as you want. Another example, which might help to visualize this (of course, don't actually type the brackets):

	qbs build [debug profile:gcc] [release profile:gcc someproperty:somevalue] [release profile:clang cpp.optimization:supercharged]
-- 
Jake Petroules - jake.petroules at petroules.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20150809/bb879ede/attachment.html>


More information about the Qbs mailing list