<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 17, 2018 at 9:48 PM, David Demelier <span dir="ltr"><<a href="mailto:markand@malikania.fr" target="_blank">markand@malikania.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 2018-04-17 at 12:25 +0200, Johannes Zarl-Zierl wrote:<br>
> Just replying to this topic of your message: you may want to<br>
> reconsider. The <br>
> cmake gui allows you to group options automatically by prefix. This<br>
> de-clutters <br>
> the options considerably.<br>
<br>
I didn't know that! Nice catch. I'll reconsider using prefix then. I've<br>
usually named my options WITH_FOO, do you recommend to use<br>
PROJECT_WITH_FOO or WITH_PROJECT_FOO then?<br></blockquote><div><br></div><div><br></div><div>Definitely go with PROJECT_WITH_FOO. Only the letters up to the first underscore are used for the grouping in cmake-gui. For larger hierarchical projects, this grouping feature is pretty important if you want any chance of keeping the variables manageable in the GUI. The project-specific prefix is also good protection against name clashes with other parts of the build (always consider the possibility that your project may one day be used as part of some larger parent project, pulled in by add_subdirectory()).</div></div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Craig Scott<br><div>Melbourne, Australia</div><div><a href="https://crascit.com" target="_blank">https://crascit.com</a><br></div></div></div></div></div></div></div>
</div></div>