Re: [AD] CMake: enabling multiple configurations within a single MSVC solution file

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Mon, Jul 12, 2010 at 10:26 PM, Peter Wang <novalazy@xxxxxxxxxx> wrote:

Certainly I was unaware that CMake supports multiple configurations at
once[1], so there might be assumptions lurking.  Based on a search for
CMAKE_BUILD_TYPE, I can only see one problem (other than naming), where
we conditionally set D3D_DEBUG_INFO.
 But CMake already supports
defining different symbols for different build types so it is easily
fixed.

If I my understanding of CMake is correct, conditions using CMAKE_BUILD_TYPE should not be affected by altering CMAKE_CONFIGURATION_TYPES:
  1. CMAKE_CONFIGURATION_TYPES is just a list of possible CMAKE_BUILD_TYPES to choose from.
  2. When selecting a configuration from MSVC, you are essentially "dynamically" selecting the CMAKE_BUILD_TYPE
Therefore D3D_DEBUG_INFO will still be set correctly for each configuration..
References:
http://www.cmake.org/pipermail/cmake/2004-July/005286.html

When using a visual studio generator the intention is to have the
configuration selected at build-time just as in native visual studio
projects.

http://www.cmake.org/pipermail/cmake/2007-April/013479.html

Note that CMAKE_BUILD_TYPE is not initialized with a readable value at configuration time.
This is because the user is free to select a build type at build time.





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/