[QBS] Using 'cpp' module from Group item

Иван Комиссаров abbapoh at gmail.com
Mon Jan 12 08:21:12 CET 2015


As documentation says, Properties item works like
if () {} else if () {} else {},
but not like if () {} else if () {} {} statement

Offtopic: anyway, why Group and Properties are separate items?

Иван Комиссаров

> 12 янв. 2015 г., в 6:28, Andrey Anpilogov <anpilog at gmail.com> написал(а):
> 
> Yup. "Properties" is exactly what I've been looking for! Thanks.
> 
> Here is some notes about this question.
> I'll leave it here for anyone who will google for same issue:
>     cpp.defines: base.concat([
>             "DEFINE_1",
>             "DEFINE_2",
>     ])
> 
>     Properties {
>         condition: project.cpu.contains("NRF51822")
> 
>         cpp.defines: base.concat([
>             "CPU_DEFINE_1",
>             "CPU_DEFINE_2",
>         ])
>     }
> 
> Resulting cpp.defines includes only CPU_DEFINE_1 and CPU_DEFINE_2.
> 
> I had to use product variable and concatenate it with cpp.defines in Properties item.
> I guess it happens because in Product there could be only one cpp.define assignment.
> 
> 
> 2015-01-12 4:27 GMT+08:00 Andrew Knight <qt at panimo.net <mailto:qt at panimo.net>>:
> Hi,
> 
> 
> On 01/11/2015 08:02 PM, Andrey Anpilogov wrote:
> Hi,
> 
> Seems like condition doesn't work correct:
> 
> Group {
>      condition: project.cpu.contains("NRF51822")
>      cpp.includePaths: ['dir1', 'dir2']
> }
> 
> Qbs doesn't add 'dir1' and 'dir2' folders to compiler.
> Is it valid definition?
> 
> It looks like you want a Properties item instead. Groups apply to files within the Product, not the Product as a whole.
> 
> 
> Regards
> 
> 
> -AK
> 
> 
> 
> -- 
> -- 
> WBR,
>   Andrii Anpilogov
>   Phone: +86 186-1660-3720
>   Skype: anpilogov.andrey
>   mailto:anpilog at gmail.com <mailto:anpilog at gmail.com>, andrii.anpilogov at mesheven.com <mailto:andrii.anpilogov at mesheven.com>
> 
> _______________________________________________
> QBS mailing list
> QBS at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20150112/2d909611/attachment.html>


More information about the Qbs mailing list