CMAKE_CONFIGURATION_TYPES considered harmful

Manuel "Sput" Nickschas sputnick at quassel-irc.org
Wed Nov 5 22:38:20 CET 2008


Hi guys,

we at Gentoo have recently discovered that KDE's packages always use the 
Debugfull configuration for installation:

-- Install configuration: "Debugfull"

This happens also if CMAKE_BUILD_TYPE="Release". We have hunted down that 
issue and traced it back to FindKDE4Internal.cmake line 1033:

set (CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} "Debugfull")

While in theory and according to cmake docs this should just add the 
additional build configuration to a list of existing ones, in reality this 
adds "Debugfull" to an empty list, since CMake does not set this variable 
(anymore? Dunno if that was always the case...). This results in CMake always 
installing Debugfull, since it's set to be the only valid type.

Testing has shown that there is no need to set this variable at all; as long 
as it's empty, CMake happily seems to use whatever the build type is. We have 
tested this for Release, Debug and Debugfull and it always installed the 
correct configuration after we removed that line from the .cmake file.

We suggest doing this upstream as well.

Thanks,
~ Sput on behalf of Gentoo's KDE herd
-- 
Manuel "Sputnick" Nickschas ("Sput" on Freenode)                  |  (o<
Member of the Quassel IRC Project - http://quassel-irc.org        |  //\
Come visit us in #quassel!                                        |  V_/_


More information about the Kde-buildsystem mailing list