We do something like this:
MACRO(ADD_CONFIGURATION CONFIGURATION PLATFORM COMPILER_FLAGS LINKER_FLAGS) # The configuration label we use internally the platform appended on it. SET( CONFIG_LABEL "${CONFIGURATION}_${PLATFORM}" ) SET( "${CONFIG_LABEL}_PLATFORM" ${PLATFORM} CACHE STRING "" FORCE ) DEBUG_MESSAGE(GEO_VERBOSE_CONFIG "Adding configuration ${CONFIG_LABEL} for platform ${PLATFORM}") DEBUG_MESSAGE(GEO_VERBOSE_CONFIG "\tcompiler flags ${COMPILER_FLAGS}") # Add the configuration to the list of configurations SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} ${CONFIG_LABEL} CACHE INTERNAL "" FORCE ) ... more stuff ENDMACRO(ADD_CONFIGURATION) I've tried initialising it with # Add the configuration to the list of configurations SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} "" CACHE INTERNAL "" FORCE ) but that doesn't remove the stock configurations, if they are already there. Joe From: David Cole [mailto:[EMAIL PROTECTED] Sent: 20 December 2007 15:20 To: Josef Karthauser Cc: Torsten Martinsen; cmake@cmake.org Subject: Re: [CMake] MSVC turn off RelWithDebInfo and MinSizeRel I will see if I can find / figure out what I did to make this work -- I know I've done it before to eliminate all but one config type... How about this in the CMakeLists.txt file instead? (Force it into the cache rather than using a simple set.) SET(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "limited configs" FORCE) Maybe? David On 12/20/07, Josef Karthauser <[EMAIL PROTECTED] > wrote: Yeah, that's a pain. I recently submitted a bug fix which allows configurations other than these stock four to be used, however sometimes these stock four get added in addition, and sometimes they're not. I've not managed to determine where or why. It's my understanding that the MSVC configuration type stuff has a few too many assumptions in the code, and is probably due a complete overhaul at some point. Maybe that's already been done for the next major release? Joe From: cmake-bounces+joe.karthauser= [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> [mailto:[EMAIL PROTECTED] On Behalf Of Torsten Martinsen Sent: 20 December 2007 08:11 To: David Cole Cc: cmake@cmake.org Subject: RE: [CMake] MSVC turn off RelWithDebInfo and MinSizeRel Unfortunately, this does not work. I just tried adding SET(CMAKE_CONFIGURATION_TYPES "Debug;RelWithDebInfo") at the top of my CMakeLists.txt, then deleted my build tree and ran cmake. The generated project files still contain Debug, Release, MinSizeRel and RelWithDebInfo. -Torsten ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Cole Sent: 20 December 2007 01:32 To: Jesse Corrington Cc: cmake@cmake.org Subject: Re: [CMake] MSVC turn off RelWithDebInfo and MinSizeRel SET(CMAKE_CONFIGURATION_TYPES "Debug;Release") in your CMakeLists.txt. (Or just edit that value in CMakeSetup to change it in the cache.) If you do it with a simple set in the CMakeLists.txt then you will not see that reflected in the CMakeSetup GUI, but it will be in effect at generation time and you should end up with sln/vcproj files with just the two types. HTH, David On 12/19/07, Jesse Corrington <[EMAIL PROTECTED]> wrote: Is there anyway to have CMake not generate these two configurations, and just generate the standard release and debug configurations instead? Thanks. ________________________________ This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored.
_______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake