[Qbs] How do I use Parameter property in a module itself?

Richard Weickelt richard at weickelt.de
Mon Jun 10 21:24:59 CEST 2019


> Is it true that all module properties should be allowed to be set per-file?
> 
>  Product {
>       Depends { name: "mymodule"; }
>       mymodule.useFeature: true // enable some probes here, do heavy checks
> 
>       Group { files: «file»;  mymodule.useFeature: false; } // does nothing, all checks are already done
>   }
> 
> What worse, this won’t work at all:
> 
>  Product {
>       Depends { name: "mymodule"; }
>       Group { files: «file»;  mymodule.useFeature: true; } // ooops
>   }
> 

This is how I understand the documentation:
Yes module properties can be specified on file level (in a group), but:
- probes are evaluated only once for each product and in product scope
- the probe would see the module properties set for a product
- the probe would not see module properties set for a group


More information about the Qbs mailing list