summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-02-11 15:12:00 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-11 15:12:00 +0100
commitdf62c31807f7b0a8b9bc222b47ccc7016cfaee65 (patch)
treea7df6263cdb4cc96e2d31486437ec19ca0bf01e5 /qmake/generators/win32
parent17de86f2824c1807c0fa7fa7ae0ed3b7d2acca00 (diff)
parenta1fe728fa5bd6cb9e50cf317a58efcf4eea4de2c (diff)
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'qmake/generators/win32')
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index 2eac5c1a55..4f946001bf 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -953,13 +953,15 @@ static inline QString toString(compileAsManagedOptions option)
return QString();
}
-static inline QString toString(debugOption option)
+static inline QString toString(debugOption option, DotNET compilerVersion)
{
switch (option) {
case debugUnknown:
case debugLineInfoOnly:
break;
case debugDisabled:
+ if (compilerVersion <= NET2010)
+ break;
return "None";
case debugOldStyleInfo:
return "OldStyle";
@@ -1425,6 +1427,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
@@ -1444,7 +1457,8 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool)
<< attrTagS(_CompileAsManaged, toString(tool.CompileAsManaged))
<< attrTagT(_CompileAsWinRT, tool.CompileAsWinRT)
<< attrTagT(_CreateHotpatchableImage, tool.CreateHotpatchableImage)
- << attrTagS(_DebugInformationFormat, toString(tool.DebugInformationFormat))
+ << attrTagS(_DebugInformationFormat, toString(tool.DebugInformationFormat,
+ tool.config->CompilerVersion))
<< attrTagT(_DisableLanguageExtensions, tool.DisableLanguageExtensions)
<< attrTagX(_DisableSpecificWarnings, tool.DisableSpecificWarnings, ";")
<< attrTagS(_EnableEnhancedInstructionSet, toString(tool.EnableEnhancedInstructionSet))
@@ -1480,7 +1494,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)