[Cmake] FW: Studio 7 Debugging types

William A. Hoffman billlist at nycap . rr . com
Wed, 26 Nov 2003 15:05:50 -0500


There is a general problem with the visual studio 7 generation.
The flags in the CMAKE_* variables are not always mapped to the 
GUI settings.  

This can be found here:
http://www . cmake . org/Bug/bug . php?op=show&bugid=42&pos=0

At some point all the possible flags need to be mapped to the GUI
settings.   

As for Release having a program database, this is what the IDE
does by default.  If you create a new project without cmake using
the IDE, and look at the Release build, it will have a program
database on.

I guess you could use the nmake makefiles and the flags will work.
Other than that you could change the cmake source, or wait until this
issue gets resolved.

-Bill

At 12:33 PM 11/26/2003, Brian O'Kennedy wrote:
>Hi, 
>
>I've been having some problems forcing CMake to set specific debug types
>(/Z7 in this case) for Visual Studio .NET 2003. I've downloaded the simple
>cmakeExample.tar.gz (http://www . cmake . org/HTML/Examples . html) and tested the
>following. 
>
>Generating a solution from this sets Project Options->C/C++->General->Debug
>Information Format = Program Database (/Zi)
>under both Debug and Release build types. 
>
>This is not quite what I'd expect from looking at the the following advanced
>options in CMakeSetup:
>CMAKE_CXX_FLAGS_RELEASE = /MD /O2
>CMAKE_CXX_FLAGS_DEBUG   = /MDd /Zi /Od /GZ
>
>Surely this means that Debug builds should have Program Database (/Zi) and
>Release builds no debugging info at all?
>
>What I'm trying to do is force /Z7 debugging info for Debug builds, and no
>debugging info for Release builds by setting the advanced options in
>CMakeSetup to:
>
>CMAKE_CXX_FLAGS_RELEASE = /MD /O2
>CMAKE_CXX_FLAGS_DEBUG   = /MDd /Z7 /Od /GZ
>
>This however still generates a solution with /Zi as the debugging format.
>What it DOES do is add /Z7 to Project Options->C/C++->Command
>Line->Additional Options. 
>
>What seems to happen here is that Studio still has a /Zi included in the
>options, no matter what you specify in the CMAKE_CXX flag options.  
>
>Any idea how I can force CMake to force VStudio to generate /C7 debugging
>info?
>
>Many Thanks,
> Brian
>
>-- 
>Brian O'Kennedy <b . okennedy at 2d3 . com> 
>2d3 Ltd, 14 Minns Estate, West Way, Oxford,OX2 0JB, U.K.
>
>________________________________________________________________________
>This e-mail, and any attachment, is confidential. If you have received it in error, do not use or disclose the information in any way, notify me immediately, and please delete it from your system.
>________________________________________________________________________
>_______________________________________________
>Cmake mailing list
>Cmake at www . cmake . org
>http://www . cmake . org/mailman/listinfo/cmake