Browse Source

Autogen: Revert passing compiler implicit includes to moc

Passing an incomplete list of compiler include directories causes
a regression in the KIO project (and probably others). We need to
disable it until the complete list is available (see #16291).

Fixes: #18669
Issue: #18041
Sebastian Holtermann 7 years ago
parent
commit
187481d4d9
3 changed files with 24 additions and 6 deletions
  1. 13 0
      Help/release/3.13.rst
  2. 7 3
      Source/cmQtAutoGenInitializer.cxx
  3. 4 3
      Tests/QtAutogen/CommonTests.cmake

+ 13 - 0
Help/release/3.13.rst

@@ -239,3 +239,16 @@ Other Changes
   These internal implementation modules are also no longer available
   to scripts that may have been incorrectly including them, because
   they should never have been available in the first place.
+
+Updates
+=======
+
+Changes made since CMake 3.13.0 include the following.
+
+3.13.2
+------
+
+* CMake 3.13.0 included a change to pass compiler implicit include
+  directories to the ``moc`` tool for :prop_tgt:`AUTOMOC`.  This has
+  been reverted due to regressing existing builds and will need
+  further investigation before being re-introduced in a later release.

+ 7 - 3
Source/cmQtAutoGenInitializer.cxx

@@ -386,9 +386,13 @@ bool cmQtAutoGenInitializer::InitMoc()
 
   // Moc includes
   {
-    bool const appendImplicit = (this->QtVersion.Major == 5);
-    auto GetIncludeDirs =
-      [this, localGen, appendImplicit](std::string const& cfg) -> std::string {
+    // We need to disable this until we have all implicit includes available.
+    // See issue #18669.
+    // bool const appendImplicit = (this->QtVersion.Major == 5);
+
+    auto GetIncludeDirs = [this,
+                           localGen](std::string const& cfg) -> std::string {
+      bool const appendImplicit = false;
       // Get the include dirs for this target, without stripping the implicit
       // include dirs off, see
       // https://gitlab.kitware.com/cmake/cmake/issues/13667

+ 4 - 3
Tests/QtAutogen/CommonTests.cmake

@@ -23,9 +23,10 @@ endif()
 if(QT_TEST_ALLOW_QT_MACROS)
   ADD_AUTOGEN_TEST(MocCMP0071)
 endif()
-if(QT_TEST_VERSION GREATER 4)
-  ADD_AUTOGEN_TEST(MocOsMacros)
-endif()
+# Disabled for issue #18669
+#if(QT_TEST_VERSION GREATER 4)
+#  ADD_AUTOGEN_TEST(MocOsMacros)
+#endif()
 ADD_AUTOGEN_TEST(UicInclude uicInclude)
 ADD_AUTOGEN_TEST(UicInterface QtAutoUicInterface)
 ADD_AUTOGEN_TEST(ObjectLibrary someProgram)