fix PRECOMPILED_SOURCE regression in vc(x)projs
Commit af760349 in Qt4 broke the possibility of having a PRECOMPILED_SOURCE in a different directory than the PRECOMPILED_HEADER. Do not write the PrecompiledHeaderThrough value for the PRECOMPILED_SOURCE, but use the project default. The msbuild code path needed adjustments to write the UsePrecompiledHeader value, even if PrecompiledHeaderThrough is empty. Task-number: QTBUG-41917 Change-Id: I74e621f6618cf056e3967c99a2215f76c346b9ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
1c91ce375e
commit
dc612acdc6
@ -1956,11 +1956,13 @@ bool VCXProjectWriter::outputFileConfig(OutputFilterData *d, XmlOutput &xml, Xml
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( !filter.CompilerTool.PrecompiledHeaderThrough.isEmpty() ) {
|
if ( !filter.CompilerTool.PrecompiledHeaderThrough.isEmpty() ) {
|
||||||
|
|
||||||
xml << tag("PrecompiledHeaderFile")
|
xml << tag("PrecompiledHeaderFile")
|
||||||
<< attrTag("Condition", condition)
|
<< attrTag("Condition", condition)
|
||||||
<< valueTag(filter.CompilerTool.PrecompiledHeaderThrough)
|
<< valueTag(filter.CompilerTool.PrecompiledHeaderThrough);
|
||||||
<< tag("PrecompiledHeader")
|
}
|
||||||
|
|
||||||
|
if (filter.CompilerTool.UsePrecompiledHeader != pchUnset) {
|
||||||
|
xml << tag("PrecompiledHeader")
|
||||||
<< attrTag("Condition", condition)
|
<< attrTag("Condition", condition)
|
||||||
<< valueTag(toString(filter.CompilerTool.UsePrecompiledHeader));
|
<< valueTag(toString(filter.CompilerTool.UsePrecompiledHeader));
|
||||||
}
|
}
|
||||||
|
@ -2237,7 +2237,8 @@ void VCFilter::modifyPCHstage(QString str)
|
|||||||
useCompilerTool = true;
|
useCompilerTool = true;
|
||||||
// Setup PCH options
|
// Setup PCH options
|
||||||
CompilerTool.UsePrecompiledHeader = (isCFile ? pchNone : pchCreateUsingSpecific);
|
CompilerTool.UsePrecompiledHeader = (isCFile ? pchNone : pchCreateUsingSpecific);
|
||||||
CompilerTool.PrecompiledHeaderThrough = (isCPPFile ? Project->precompHFilename : QString("$(NOINHERIT)"));
|
if (isCFile)
|
||||||
|
CompilerTool.PrecompiledHeaderThrough = QLatin1String("$(NOINHERIT)");
|
||||||
CompilerTool.ForcedIncludeFiles = QStringList("$(NOINHERIT)");
|
CompilerTool.ForcedIncludeFiles = QStringList("$(NOINHERIT)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user