[QBS] Using 'cpp' module from Group item

Andrey Anpilogov anpilog at gmail.com
Mon Jan 12 04:28:12 CET 2015


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>:

> 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, andrii.anpilogov at mesheven.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20150112/4466e077/attachment.html>


More information about the Qbs mailing list