<div dir="ltr"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote><div>Seen in the boost discussions on the CMake announcements:</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> The rest can be implemented straightforwardly as cache options so that<br>> you can run cmake with options like<br>><br>>   -Dvalgrind=OFF -Dtransactional-memory=ON -Dsegmented-stacks=ON [-D…]<br>...</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Secondly, in cmake 3 we try not to configure things using -D as we did<br>in cmake 2. Instead we make targets customised for that build<br>combination. The user then chooses to make or link to those targets if<br>they want those targets.<br></blockquote><div> </div><div>Is this true, and is there a good example of a project with such a configuration?</div><div><br></div><div>I've been trying to learn the more modern approaches to writing CMakeLists recently, and haven't come across such advice - I was under the impression that cache-set options (that the build can make decisions on) was still the recommended 'clean' way, and then options (and even extra sources, dependencies) can be added to each target as required.</div><div><br></div><div>As I imagine what this is saying, It seems that target-per-configuration would just lead to an explosion of duplicated targets and duplicated code, especially through every permutation of several different options? </div><div><br></div><div>Part of the niceness of target-oriented dependencies was just having one thing to link to and depending on the configuration, that target would be the correct one (and pass through it's configuration).</div><div><br></div><div>Nick</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote></div>