summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenInitializer.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2018-07-25 11:42:45 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2018-07-30 07:22:47 (GMT)
commitf3451358456dc10169f56bfbd2de7d311df1eef3 (patch)
treee48e598e695ebd75dc0bc6c8b3c7926e7c81ce79 /Source/cmQtAutoGenInitializer.cxx
parent2d6cfe26770d8062081061f9dbcc4e3e6eaa0091 (diff)
downloadCMake-f3451358456dc10169f56bfbd2de7d311df1eef3.zip
CMake-f3451358456dc10169f56bfbd2de7d311df1eef3.tar.gz
CMake-f3451358456dc10169f56bfbd2de7d311df1eef3.tar.bz2
Autogen: For Qt5 pass all implicit include directories to moc
For Qt4 it was not possible to pass all compiler implicit include directories to moc because it couldn't handle some system headers. For reference see commit 753b905ec86ffe369d4f59a7a8ced5fedc42939f, commit d2536579d51e77827b8e55f39123316324314781 and [QTBUG-28045](https://bugreports.qt.io/browse/QTBUG-28045). For Qt5's moc the problem does not persist anymore so we can (and should) pass all implicit include directories to moc. Fixes #18041
Diffstat (limited to 'Source/cmQtAutoGenInitializer.cxx')
-rw-r--r--Source/cmQtAutoGenInitializer.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index 607afbf..7cfdeba 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -380,13 +380,15 @@ bool cmQtAutoGenInitializer::InitMoc()
// Moc includes
{
- auto GetIncludeDirs = [this,
- localGen](std::string const& cfg) -> std::string {
+ bool const appendImplicit = (this->QtVersionMajor == "5");
+ auto GetIncludeDirs =
+ [this, localGen, appendImplicit](std::string const& cfg) -> std::string {
// Get the include dirs for this target, without stripping the implicit
// include dirs off, see
// https://gitlab.kitware.com/cmake/cmake/issues/13667
std::vector<std::string> dirs;
- localGen->GetIncludeDirectories(dirs, this->Target, "CXX", cfg, false);
+ localGen->GetIncludeDirectories(dirs, this->Target, "CXX", cfg, false,
+ appendImplicit);
return cmJoin(dirs, ";");
};