Thanks, this works. Actually<br><br>if(CMAKE_CONFIGURATION_TYPES)<br>
set(CMAKE_CONFIGURATION_TYPES Debug Release DebugMX31 ReleaseMX31)<br><div class="im"> set(CMAKE_CONFIGURATION_TYPES
"${CMAKE_CONFIGURATION_TYPES}" CACHE STRING<br></div>
"Reset the configurations to what we need" FORCE)<br> endif()<br><br>also
works for me. I've added it to the FAQ of the Wiki. But this is only half of what need. I actually need to
make this generate settings for a different platform as well, I mean
'platform' in the Visual Studio sense, also called 'solution platform'
in Visual Studios configuration manager, which is Win32 by default, but I
need it for both Win32 and MX31.<br>
<br>Can this be done with CMake? I'm afraid not, but if it is possible,
how? In the project file it is written as something like Debug|MX31, but
using that in CMake doesn't work.<br>
<br>Mark<br><br><div class="gmail_quote">2010/6/28 Michael Wild <span dir="ltr"><<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5"><br>
On 28. Jun, 2010, at 15:17 , Mark Van Peteghem wrote:<br>
<br>
> Hi,<br>
><br>
> I am using CMake to generate Visual Studio project files, later also for<br>
> CodeBlocks.<br>
><br>
> It seems that CMake generates four different configurations for Visual<br>
> Studio: Debug, Release, MinSizeRel and RelWithDebInfo. However, I need other<br>
> configuations, Debug and Release, both for Win32 and MX3, in one project<br>
> file. How do I change this?<br>
><br>
> I tried this by changing *CMAKE_CONFIGURATION_TYPES *and CMAKE_BUILD_TYPES,<br>
> e.g.<br>
><br>
> SET(CMAKE_BUILD_TYPES Debug Release DebugMX31 ReleaseMX31)<br>
><br>
> but I have the impression that these variables cannot be changed.<br>
><br>
> --<br>
> Mark<br>
<br>
</div></div>You have to change CMAKE_CONFIGURATION_TYPES in the cache. Here is some template I use:<br>
<br>
# Xcode generator is buggy (linker flags are not inherited from compile flags<br>
# and custom configurations don't work with shared libraries)<br>
if(NOT CMAKE_GENERATOR STREQUAL Xcode)<br>
set(CMAKE_C_FLAGS_SUPERDUPER "--super --duper" CACHE<br>
STRING "Flags used by the compiler during super-duper builds")<br>
set(CMAKE_EXE_LINKER_FLAGS_SUPERDUPER "--super --duper" CACHE<br>
STRING "Flags used by the linker for executables during super-duper builds")<br>
set(CMAKE_SHARED_LINKER_FLAGS_SUPERDUPER "--super --duper" CACHE<br>
STRING "Flags used by the linker for shared libraries during super-duper builds")<br>
set(CMAKE_MODULE_LINKER_FLAGS_SUPERDUPER "--super --duper" CACHE<br>
STRING "Flags used by the linker for loadable modules during super-duper builds")<br>
mark_as_advanced(CMAKE_C_FLAGS_COVERAGE CMAKE_EXE_LINKER_FLAGS_SUPERDUPER<br>
CMAKE_SHARED_LINKER_FLAGS_SUPERDUPER CMAKE_MODULE_LINKER_FLAGS_SUPERDUPER)<br>
# This variable is only set for multi-config IDE generators<br>
if(CMAKE_CONFIGURATION_TYPES)<br>
list(APPEND CMAKE_CONFIGURATION_TYPES SuperDuper)<br>
list(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES)<br>
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING<br>
"Semicolon separated list of supported configuration types [Debug|Release|MinSizeRel|RelWithDebInfo|SuperDuper]"<br>
FORCE)<br>
endif()<br>
endif()<br>
<br>
HTH<br>
<font color="#888888"><br>
Michael<br>
<br>
</font></blockquote></div><br>