macros.cmake: set -DCMAKE_BUILD_TYPE=ReleaseWithDebInfo by default

Rex Dieter rdieter at math.unl.edu
Mon Nov 12 22:46:52 UTC 2012


See also,
https://bugzilla.redhat.com/show_bug.cgi?id=875954

orionp and I were discussing on irc today, the idea to add 
-DCMAKE_BUILD_TYPE=ReleaseWithDebInfo
to %cmake by default in /etc/rpm/macros.cmake , while making it easy to 
set/override manually, similar to how %_cmake_lib_suffix64 is currently 
handled.

the idea being that many cmake projects default to Release (or not, 
sometimes goofy things like Debug)

The idea being that many projects default to CMAKE_BUILD_TYPE=Release and 
end up pulling in -O3 (and -DNDEBUG).

There's 2 issues we'd like some wider input.  What disadvantages or side-
effects are there to:

1.  setting a default CMAKE_BUILD_TYPE?

2.  building with -DNDEBUG by default?




Personally, 

1.  Re: CMAKE_BUILD_TYPE: I feel anything that breaks due to this is 
probably already broken in some regard, and is worth fixing anyway.  After 
all, we did make this easy to set/override manually.



More information about the devel mailing list