[Qbs] "Multi" Properties

Карелин Павел hkarel at yandex.ru
Mon Dec 18 12:04:21 CET 2017


Hi,

In my project, I use the following construction:

     cpp.defines: {
         var def = [];
         if (project.simdDebug)
             def.push("SIMD_DEBUG");

         if (project.useSimd)
             def.push("USE_SIMD");

         return def;
     }

It works fine.
But I decided to experiment and do the same through "Properties"

     Properties {
         condition: project.simdDebug
         cpp.defines: outer.concat(["SIMD_DEBUG"])
     }
     Properties {
         condition: project.useSimd
         cpp.defines: outer.concat(["USE_SIMD"])
     }

As a result, I get either SIMD_DEBUG or USE_SIMD at the output, but not 
both at once.
Is it possible to get both values immediately using "Properties"?

--
BR, Pavel Karelin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20171218/9fe3f9e1/attachment.html>


More information about the Qbs mailing list