[QBS] Using 'cpp' module from Group item

Andrey Anpilogov anpilog at gmail.com
Mon Jan 12 02:52:54 CET 2015


Thanks for advise, Oleksiy. I use it as workaround.

Does anybody know why it doesn't work without JS?
Using Group item makes qbs file much readable and clean...
Besides regarding to manual it should work.

2015-01-12 2:11 GMT+08:00 Slyshyk Oleksiy <alexslyshyk at gmail.com>:

> Hi Andrey.
>
> If you wish add include paths by condition you can use javascript :
> cpp.includePaths: {
> var inc = base
> if(project.cpu.contains("NRF51822"){
> inc = inc.concat( ['dir1', 'dir2'])
> }
> return inc
> }
>
> 2015-01-11 20:02 GMT+02:00 Andrey Anpilogov <anpilog at gmail.com>:
>
>> 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?
>>
>> Regards
>>
>> _______________________________________________
>> QBS mailing list
>> QBS at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/qbs
>>
>>
>


-- 
-- 
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/27aeb5a4/attachment.html>


More information about the Qbs mailing list