Merge topic 'vs2010-dbginfo-default'

e234122 VS2010: Disable PDBs when there is no debug info
This commit is contained in:
Brad King 2010-08-24 14:42:31 -04:00 committed by CMake Topic Stage
commit 70f3b06b7c
1 changed files with 9 additions and 0 deletions

View File

@ -1033,6 +1033,15 @@ void cmVisualStudio10TargetGenerator::WriteClOptions(
clOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", ""); clOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
this->OutputIncludes(includes); this->OutputIncludes(includes);
clOptions.OutputFlagMap(*this->BuildFileStream, " "); clOptions.OutputFlagMap(*this->BuildFileStream, " ");
// If not in debug mode, write the DebugInformationFormat field
// without value so PDBs don't get generated uselessly.
if(!clOptions.IsDebug())
{
this->WriteString("<DebugInformationFormat>"
"</DebugInformationFormat>\n", 3);
}
clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ",
"\n"); "\n");
this->WriteString("<AssemblerListingLocation>", 3); this->WriteString("<AssemblerListingLocation>", 3);