Add some information to Packaging cmake wiki

Kevin Kofler kevin.kofler at chello.at
Wed Feb 29 04:34:43 UTC 2012


Richard Shaw wrote:
> Hmm... I guess we shouldn't add it to the cmake macro then :) I
> usually wait and see if there's a problem first and then try that as
> the fix. I haven't had a situation where it gave me bad flags yet, but
> I did have a package that hard coded "Release" with bad flags (-O3
> etc..) so I had to patch around that one.

Oh, by the way, "Release" isn't even necessarily the default build type. 
CMake has no built-in default (i.e. it will only use the global CFLAGS, not 
those from any build type, which is actually often what we want), and some 
packages define its own, which can be RelWithDebInfo or even Debug. (For 
example, anything using find_package(KDE4) which doesn't specify its own 
gets the default build type set to RelWithDebInfo by FindKDE4Internal.cmake. 
Our %cmake_kde4 macro actually forces it to Release instead for the reasons 
already discussed (NDEBUG flags).)

        Kevin Kofler



More information about the devel mailing list