Priority: Not Evaluated
Affects Version/s: None
Fix Version/s: None
Component/s: Language Syntax & Semantics
Currently, people are forced to write their project files a bit redundantly once conditions come into play:
Instead, we would like to write:
This new item type would behave as follows:
- Its only property is "condition".
- It allows the same child items as its parent item (including itself, i.e. it is nestable).
- The conditions of all child items are implicitly AND'ed with the condition of the item.
Note that this would also solve the problem of sharing source files between products: While this is already possible by putting a Groups into a dedicated qbs file, we can neither add dependencies nor set properties for other source files in there, so the qbs file cannot always be made self-contained.
The main challenge here is probably dealing with property assignments. For instance:
The conditions x and y are not necessarily disjunct, so if both are true, cpp.defines needs to get merged, similarly to how it's done with property assignments from different modules.
Also, if both conditions are false, cpp.defines must not be affected at all. This might sound obvious, but is not how the Properties item currently behaves and probably requires quite a bit of tinkering with low-level code.