CMAKE_CONFIGURATION_TYPES considered harmful

Andreas Pakulat apaku at gmx.de
Thu Nov 6 02:49:26 CET 2008


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.


More information about the Kde-buildsystem mailing list