summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-06-16 12:31:51 +0200
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2015-06-22 06:24:47 +0000
commit059e1df345bab5754488a63e6d149de86ebf655a (patch)
treed073d137fe0a59e1c887d421944c788ebad878f8 /qmake
parentaec2b28eea3354ec80350e25f4305c74ca9bc184 (diff)
fix PCH related regression in vcxproj generator
When PRECOMPILED_HEADER is set to foo/bar/stable.h and PRECOMPILED_SOURCE is empty, then a C++ file foo/bar/stable.cpp is generated that contains the include "stable.h". We must pass the exact string "stable.h" to the /Yc compile switch instead of "foo/bar/stable.h". Commit dc612acdc6577594c8f61345cea2de549d7aae34 introduced this regression to allow to have PRECOMPILED_SOURCE in a different directory than PRECOMPILED_HEADER. Change-Id: I1a7e096c0455b946a5660d23c70c72abd4c7ac1b Task-number: QTBUG-46679 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index aa7320bc27..09937c8ac2 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -2238,6 +2238,8 @@ void VCFilter::modifyPCHstage(QString str)
CompilerTool.UsePrecompiledHeader = (isCFile ? pchNone : pchCreateUsingSpecific);
if (isCFile)
CompilerTool.PrecompiledHeaderThrough = QLatin1String("$(NOINHERIT)");
+ else if (autogenSourceFile)
+ CompilerTool.PrecompiledHeaderThrough = Project->precompHFilename;
CompilerTool.ForcedIncludeFiles = QStringList("$(NOINHERIT)");
}