[CMake] CMake 2.4.2 generates undebuggable .vcproj projects.

Rob Mathews Rob.Mathews at varolii.com
Thu May 24 12:49:52 EDT 2007


It seems that the Cmakelists.txt file is missing the "/Zi" option. If
you include that option, then CMake will do the right thing. Probably,
in the past, it would do that by default. 


-----Original Message-----
From: Bill Hoffman [mailto:bill.hoffman at kitware.com] 
Sent: Thursday, May 24, 2007 12:12 PM
To: Rob Mathews
Cc: cmake at cmake.org
Subject: Re: [CMake] CMake 2.4.2 generates undebuggable .vcproj
projects.

Does it work in CMake 2.4.6?
Strange, but I am pretty sure many folks here at Kitware are debugging 
with no problem. 

-Bill


Rob Mathews wrote:
> To reproduce, take CMake 2.4.1 from CVS and build it. 
>
> Open the CMake.sln file, right click on CMake project, choose
> properties. 
>
> Look Properties->C/C++->General tag, the "Debug Information Format"
> field. It says "Disabled". 
>
> Ie, you can't set a breakpoint. Or, rather, you set the breakpoint and
> as so as you run the program all the breakpoints change to '?' and
they
> don't work. 
>
> This is because the vcproj file is incorrect, and lacks a
> DebugInformationFormat tag on the VCCLCompilerTool. 
>
> Ie, DebugInformationFormat="3", as in: 
>
> 			<Tool
> 				Name="VCCLCompilerTool"
> 				Optimization="0"
> 				AdditionalIncludeDirectories="b:\"
> 	
> PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
> 				MinimalRebuild="TRUE"
> 				BasicRuntimeChecks="3"
> 				RuntimeLibrary="5"
> 				UsePrecompiledHeader="3"
> 				WarningLevel="3"
> 				Detect64BitPortabilityProblems="TRUE"
> 				DebugInformationFormat="3"/>
>
> Also, the linker tool, GenerateDebugInformation="TRUE", as in: 
>
> 			<Tool
> 				Name="VCLinkerTool"
> 	
> OutputFile="$(OutDir)/boost_function.exe"
> 				LinkIncremental="2"
> 				GenerateDebugInformation="TRUE"
> 	
> ProgramDatabaseFile="$(OutDir)/boost_function.pdb"
> 				SubSystem="1"
> 				TargetMachine="1"/>
>
>
> Obviously, this is a trivial fix to
> Source\cmLocalVisualStudio7Generator.cxx, in and around lines 498. 
>
>
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
>   





More information about the CMake mailing list