[CMake] CMAKE_CONFIGURATION_TYPES bug??

Marcel Loose loose at astron.nl
Thu Jan 21 03:21:15 EST 2010


Hi all,

I noticed a behaviour of CMAKE_CONFIGURATION_TYPES and CMAKE_BUILD_TYPE
that is close to wizardry in my opinion when it comes to 'make install'

It seems that 'make install' prefers to use "install configurations"
that are predefined in CMake (i.e. debug, minsizerel, release, etc.)
over user-defined types. If none of the user-defined configuration types
in CMAKE_CONFIGURATION_TYPES matches any of these, "make install"
appears to default to the first item in CMAKE_CONFIGURATION TYPES.

Furthermore, if no matching CMAKE_BUILD_TYPE is specified, 'make
install' seems to use the "most optimized" configuration type of the
predefined types.

Consider the following examples:

$ cmake .. -DCMAKE_CONFIGURATION_TYPES="aap;noot;mies" \
    -DCMAKE_BUILD_TYPE="noot" && make install
...
Install the project...
-- Install configuration: "aap"

cmake .. -DCMAKE_CONFIGURATION_TYPES="aap;noot;mies;debug" \
    -DCMAKE_BUILD_TYPE="noot" && make install
...
Install the project...
-- Install configuration: "debug"

$ cmake .. -DCMAKE_CONFIGURATION_TYPES="aap;noot;release;mies;debug" \
    -DCMAKE_BUILD_TYPE="noot" && make install
...
Install the project...
-- Install configuration: "release"

Is this a bug, or am I completely missing the point here?

Best regards,
Marcel Loose.



More information about the CMake mailing list