소스 검색

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 6 년 전
부모
커밋
4be7f38d57
2개의 변경된 파일8개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 3
      Source/cmQtAutoGenInitializer.cxx
  2. 2 1
      Tests/QtAutogen/Tests.cmake

+ 6 - 3
Source/cmQtAutoGenInitializer.cxx

@@ -489,10 +489,13 @@ bool cmQtAutoGenInitializer::InitMoc()
 
   // Moc includes
   {
-    bool const appendImplicit = (this->QtVersion.Major == 5);
+    // 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,
-       appendImplicit](std::string const& cfg) -> std::vector<std::string> {
+      [this, localGen](std::string const& cfg) -> std::vector<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

+ 2 - 1
Tests/QtAutogen/Tests.cmake

@@ -39,7 +39,8 @@ endif()
 # Qt5 only tests
 if(QT_TEST_VERSION GREATER 4)
   ADD_AUTOGEN_TEST(MocMacroName mocMacroName)
-  ADD_AUTOGEN_TEST(MocOsMacros)
+  # Disabled for issue #18669
+  #ADD_AUTOGEN_TEST(MocOsMacros)
   ADD_AUTOGEN_TEST(RerunMocPlugin)
   if(APPLE)
     ADD_AUTOGEN_TEST(MacOsFW)