[CMake] CMake 2.4.2 generates undebuggable .vcproj projects.

Bill Hoffman bill.hoffman at kitware.com
Thu May 24 12:12:13 EDT 2007


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