Boost logo

Boost :

Subject: Re: [boost] CMake - one more time
From: Rob Stewart (rstewart_at_[hidden])
Date: 2016-04-24 19:43:25


On April 23, 2016 1:19:08 PM EDT, Paul Fultz II <pfultz2_at_[hidden]> wrote:
>> On Apr 23, 2016, at 9:30 AM, Raffi Enficiaud
><raffi.enficiaud_at_[hidden]> wrote:
>
>> Let me (try to) explain my point with an "analogy" with templates vs
>overloads:
>>
>> What cmake can do is:
>> -------- declare possibly N combinations
>> targetA(variant1, compilation_options1);
>> targetA(variant1, compilation_optionsM);
>> ...
>> targetA(variantN, compilation_optionM);
>> --------
>>
>> and then consume a subset of the declared combination:
>>
>> --------
>> targetA(variantX, compilation_optionsY);
>> --------
>> with 1<= X <= N, 1 <= Y <= M.
>>
>>
>> --------
>> What BJam can do is:
>>
>> --------
>> template <class variants, class compilation_options>
>> targetA(variants, compilation_options);
>>
>> -------- and then consume any:
>> targetA(variantX, compilation_optionsY);
>> --------
>>
>> with the same flexibility as templates: the instance of generating a
>version of targetA is defined at the point it is consumed.
>
>I do not follow this analogy at all.

With CMake, you often have to add special cases and conditional logic to account for variations that might be chosen, and those variations have to be chosen in separate invocations, if not in separate build trees. With BB, you express things at a more abstract level and let the tool do the lower level work.

___
Rob

(Sent from my portable computation engine)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk