In the cbp file, for every unit, it is specified to which target it belongs. When you don't do anything special, this is most probably the 'default' target.
Now suppose you have the following, you have created library, which consists out of platform (and even compiler) independent code. And you want to compile it with a whole bunch of compilers, why ?
More compilers -> more robust for warnings, errors
Different platforms -> other compilers.
So you either GUI yourself through project settings, with copying one target to another, and then just change the things needed, or you do the copy/paste in the cbp xml file itself (way faster ;-) ).
But what if I could write this :
<Unit filename="MyFantasticCode.cpp">
<Option compilerVar="CPP"/>
<Option target="all"/>
</Unit>
Introducing a special target, the "all" target, that means, that every target that is specified in this cbp file, it belongs to it. For sure, there are lot of situations, where this does not apply, for example I don't want my source file to be in CB target, sdk target, or for that matter in the code completion plug-in target (it might slow it down ;-) ).
But in the usage I started this topic out with, it's for sure very usefull.
I have some ideas on how to implement it, off course this depends on the fact that units come after the targets in the cbp file (and are processed in this manner), so they can be added to the target specified (so in code that target already has to exist, so nothing new here).
So what do you think : praise ? horror ? great ? shoot it down ? superb ? where's that needle ? ....
Cheers,
Lieven