summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2014-01-21 18:40:43 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-30 17:48:50 +0100
commit26c33dc892c9e9e95f52d0bd1bd834667df0dc3d (patch)
treef5e50e85cbb1f9167964041e887e9b2df1e0dcdc /qmake/generators
parent6e13f4b3e03a055bafc78037b0bf68d90fbbe98d (diff)
set empty PDB file name in release config of VS 2012 vcxproj files
In release configs qmake sets DebugInformationFormat to None. If ProgramDataBaseFileName is left unset, then VS 2012 will always rebuild the complete project. Therefore, qmake now inserts an empty ProgramDataBaseFileName tag if DebugInformationFormat is None. Task-number: QTBUG-35570 Change-Id: Ifb91b0bbcf6614621bfe3b12429e2624bd16e77a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index 3ec70c1f58..fdb664f3f4 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -1384,6 +1384,17 @@ static inline triState toTriState(termSvrAwarenessType option)
return unset;
}
+static XmlOutput::xml_output fixedProgramDataBaseFileNameOutput(const VCCLCompilerTool &tool)
+{
+ if (tool.config->CompilerVersion >= NET2012
+ && tool.DebugInformationFormat == debugDisabled
+ && tool.ProgramDataBaseFileName.isEmpty()) {
+ // Force the creation of an empty tag to work-around Visual Studio bug. See QTBUG-35570.
+ return tagValue(_ProgramDataBaseFileName, tool.ProgramDataBaseFileName);
+ }
+ return attrTagS(_ProgramDataBaseFileName, tool.ProgramDataBaseFileName);
+}
+
void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool)
{
xml
@@ -1440,7 +1451,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool)
<< attrTagS(_PreprocessOutputPath, tool.PreprocessOutputPath)
<< attrTagT(_PreprocessSuppressLineNumbers, tool.PreprocessSuppressLineNumbers)
<< attrTagT(_PreprocessToFile, toTriState(tool.GeneratePreprocessedFile))
- << attrTagS(_ProgramDataBaseFileName, tool.ProgramDataBaseFileName)
+ << fixedProgramDataBaseFileNameOutput(tool)
<< attrTagS(_ProcessorNumber, tool.MultiProcessorCompilationProcessorCount)
<< attrTagS(_RuntimeLibrary, toString(tool.RuntimeLibrary))
<< attrTagT(_RuntimeTypeInfo, tool.RuntimeTypeInfo)