Re: [AD] CMake: enabling multiple configurations within a single MSVC solution file |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2010-07-15, John Murphy <wonsungi@xxxxxxxxxx> wrote:
> 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
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(D3D_DEBUG_INFO 1)
endif()
I don't see how that works, unless when you select a Debug configuration
in MSVC, it reruns cmake to regenerate alplatf.h with D3D_DEBUG_INFO
baked in?
Anyway, D3D_DEBUG_INFO shouldn't be set in such a way that it affects
user code. I'll change it, which should probably fix this problem as
well. Then you can send a patch to allow the MSVC multi-configurations :)
Peter