CMAKE_CONFIGURATION_TYPES considered harmful

Andreas Pakulat apaku at gmx.de
Thu Nov 6 02:47:28 CET 2008


On 05.11.08 22:38:20, Manuel Sput Nickschas wrote:
> 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.

I see where this is coming from. When I did the above change I didn't
notice that there's a check in line 818 in FindKDEInternal that sets the
buildtype only if the variable is empty.

So yeah, setting the variable is obviously wrong and I can't recall what
exactly the problem was that I tried to solve with it.

Andreas

-- 
You'll feel devilish tonight.  Toss dynamite caps under a flamenco dancer's
heel.


More information about the Kde-buildsystem mailing list