[Cmake] FW: Studio 7 Debugging types

Brian O'Kennedy b . o'kennedy at 2d3 . com
Wed, 26 Nov 2003 17:33:46 -0000


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.
________________________________________________________________________