On April 23, 2016 1:19:08 PM EDT, Paul Fultz II
On Apr 23, 2016, at 9:30 AM, Raffi Enficiaud
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
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)