[CMake] MSVC turn off RelWithDebInfo and MinSizeRel

Josef Karthauser joe.karthauser at geomerics.com
Thu Dec 20 10:25:14 EST 2007


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:david.cole at kitware.com] 
Sent: 20 December 2007 15:20
To: Josef Karthauser
Cc: Torsten Martinsen; cmake at 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 <joe.karthauser at geomerics.com > 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= geomerics.com at cmake.org
<mailto:geomerics.com at cmake.org>
[mailto:cmake-bounces+joe.karthauser=geomerics.com at cmake.org] On Behalf
Of Torsten Martinsen
Sent: 20 December 2007 08:11
To: David Cole
Cc: cmake at 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: cmake-bounces+tma=gatehouse.dk at cmake.org
[mailto:cmake-bounces+tma=gatehouse.dk at cmake.org] On Behalf Of David
Cole
Sent: 20 December 2007 01:32
To: Jesse Corrington
Cc: cmake at 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 <jesse.corrington at gmail.com> 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.


 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20071220/74523395/attachment.htm


More information about the CMake mailing list