Re: CMAKE_CONFIGURATION_TYPES considered harmful
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) That should be more like if(CMAKE_CONFIGURATION_TYPES) list(APPEND CMAKE_CONFIGURATION_TYPES Debugfull) endif(CMAKE_CONFIGURATION_TYPES) 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. The variable is used by the IDE generators like VS and Xcode which have multiple configurations in a single build tree. It should not be set for Makefile generators. -Brad ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: CMAKE_CONFIGURATION_TYPES considered harmful
Alexander Neundorf wrote: On Wednesday 05 November 2008, Brad King wrote: Manuel Sput Nickschas wrote: ... 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. The variable is used by the IDE generators like VS and Xcode which have multiple configurations in a single build tree. It should not be set for Makefile generators. So you would recommend checking the generator over setting CMAKE_CONFIGURATION_TYPES to CMAKE_BUILD_TYPE initially ? This is what I was about to do: if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo) set(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE} ) endif (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) The way to identify whether a generator is multi-configuration is to check whether CMAKE_CONFIGURATION_TYPES is set. The VS/XCode generators set it (and ignore CMAKE_BUILD_TYPE). The Makefile generators do not set it (and use CMAKE_BUILD_TYPE). If CMAKE_CONFIGURATION_TYPES is not already set, don't set it. -Brad ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: -O2 in Debug build?
On 06.11.08 00:34:08, Alexander Neundorf wrote: On Saturday 19 July 2008, Andreas Pakulat wrote: On 18.07.08 23:06:50, Alexander Neundorf wrote: Thanks for the explanation :-) Can you put that on techbase, somewhere related to cmake/building ? I'm putting it on techbase in a minute (if I find the right spot). However I'd also like to add the information to FindKDE4Internal.cmake and more importantly make Debugfull work with CMake 2.6. As I didn't find a reference of CMAKE_CONFIGURATION_TYPES for cmake 2.4 I've set it only for 2.6. Question (somewhat late, I know...) Why do you actually set CMAKE_CONFIGURATION_TYPES ? If I set CMAKE_BUILD_TYPE to DebugFull it works here with cmake HEAD and Makefiles. Well, back then it didn't work. Unfortunately I can't recall the details, so I can't exclude me having done something wrong. Anyway, I can't reproduce any problems here with cmake 2.6.1, that is even without the set for CMAKE_CONFIGURATION_TYPES I do get proper debug flags when using Debugfull. I don't see any problems though with a RelWithDebInfo or Debug build, none of these two use the -g3 without any optimization here. Andreas -- If you can read this, you're too close. ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: CMAKE_CONFIGURATION_TYPES considered harmful
On 06.11.08 00:25:39, Alexander Neundorf wrote: On Wednesday 05 November 2008, Brad King wrote: Manuel Sput Nickschas wrote: ... 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. The variable is used by the IDE generators like VS and Xcode which have multiple configurations in a single build tree. It should not be set for Makefile generators. So you would recommend checking the generator over setting CMAKE_CONFIGURATION_TYPES to CMAKE_BUILD_TYPE initially ? This is what I was about to do: if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo) This part already exists a couple of lines below setting CMAKE_CONFIGURATION_TYPES in FindKDE4Internal (its 818 here). So thats probably why everybody gets Debugfull builds when not specifying -DCMAKE_BUILD_TYPE :) So just remove the setting of CMAKE_CONFIGURATION_TYPES completely. Andreas -- You may worry about your hair-do today, but tomorrow much peanut butter will be sold. ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem