<div><div dir="auto">I thought about another possibility : when we’re not sure about the default, can we just not provide one?</div></div><div dir="auto"><br></div><div dir="auto">If the user invoked Cmake without the option we display a nice error asking to set it explicitly.</div><div dir="auto"><br></div><div dir="auto">— </div><div dir="auto">Mehdi </div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 23, 2020 at 8:22 AM Robinson, Paul <<a href="mailto:paul.robinson@sony.com">paul.robinson@sony.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> >     I don't think having this documented is all that helpful.  I know<br>
> that<br>
> >     when I build a new project, if I see it has cmake, I just do cmake -<br>
> G<br>
> >     Ninja && ninja and don't bother reading the docs.<br>
> ><br>
> >     I think it would make the most sense to change the default to be<br>
> >     Release+Asserts, because this is the most likely configuration to<br>
> work<br>
> >     on the average system.<br>
> ><br>
> ><br>
> > Can you expand on why release+asserts and not just release?<br>
> > I can imagine folks just wanting to try clang out of the box and finding<br>
> > it "slow" because they don't know that assertions have to be disabled<br>
> > explicitly for example.<br>
> > Of course developers have to opt-in assertions, but they also have to<br>
> > think about opting in Debug info and sanitizers.<br>
> ><br>
> <br>
> The reason I prefer enabling asserts is because it gives you better<br>
> information when something goes wrong, and I think this can be helpful<br>
> for new users.  But this is just a slight preference, I would support<br>
> either Release+Asserts or Release as the default.<br>
> <br>
> -Tom<br>
<br>
FWIW, within Sony our wrapper build script defaults to Release+Asserts.<br>
<br>
We could default to Release+Asserts if the build type is empty; but if<br>
it's not empty, we do what you asked (and Release would not imply Asserts).<br>
<br>
Has anyone measured the compiler performance difference for +Asserts lately?<br>
I have a vague memory that it was ~10% but that was quite a while ago.<br>
--paulr<br>
<br>
</blockquote></div></div>