On Mon, Nov 12, 2012 at 4:46 PM, Rex Dieter <span dir="ltr">&lt;<a href="mailto:rdieter@math.unl.edu" target="_blank">rdieter@math.unl.edu</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
See also,<br>
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=875954" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=875954</a><br>
<br>
orionp and I were discussing on irc today, the idea to add<br>
-DCMAKE_BUILD_TYPE=ReleaseWithDebInfo<br>
to %cmake by default in /etc/rpm/macros.cmake , while making it easy to<br>
set/override manually, similar to how %_cmake_lib_suffix64 is currently<br>
handled.<br>
<br>
the idea being that many cmake projects default to Release (or not,<br>
sometimes goofy things like Debug)<br>
<br>
The idea being that many projects default to CMAKE_BUILD_TYPE=Release and<br>
end up pulling in -O3 (and -DNDEBUG).<br>
<br>
There&#39;s 2 issues we&#39;d like some wider input.  What disadvantages or side-<br>
effects are there to:<br>
<br>
1.  setting a default CMAKE_BUILD_TYPE?<br>
<br>
2.  building with -DNDEBUG by default?<br></blockquote><div><br></div><div>I own several packages that use cmake and I&#39;ve taken to setting the release type to RelWithDebugInfo like you suggest. One question I&#39;ve had but never gotten around to asking is: Regardless of whether you use Release or RelWithDebugInfo, should we be building with -O3? It seems odd that the rpm macro defaults to doing something that is explicitly against the packaging guidelines.</div>
<div><br></div><div>Thanks,<br>Richard</div></div>