Commit 03dbb62d authored by Sebastian Holtermann's avatar Sebastian Holtermann Committed by Brad King
Browse files

Autogen: Reenable passing compiler implicit include directories to moc

Since commit 5990ecb7 (Compute implicit include directories from
compiler output, 2018-12-07) we now have compiler implicit include
directory computation for gcc and clang.  It should be safe now to pass
these to `moc`.  This patch re-enables passing the compiler implicit
include directories to `moc`, which was disabled due to issue #18669.

Fixes: #18041
Issue: #18669
parent 5f34bdc7
......@@ -520,13 +520,10 @@ bool cmQtAutoGenInitializer::InitMoc()
// Moc includes
{
// We need to disable this until we have all implicit includes available.
// See issue #18669.
// bool const appendImplicit = (this->QtVersion.Major >= 5);
bool const appendImplicit = (this->QtVersion.Major >= 5);
auto GetIncludeDirs =
[this, localGen](std::string const& cfg) -> std::vector<std::string> {
bool const appendImplicit = false;
[this, localGen,
appendImplicit](std::string const& cfg) -> std::vector<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
......
#include "TestClass.hpp"
#include <iostream>
void TestClass::open()
{
std::cout << "open\n";
}
// -- Mac
#ifndef Q_OS_MAC
void TestClass::MacNotDef()
......
......@@ -3,12 +3,17 @@
#include <QObject>
#include <QtGlobal>
// include qplatformdefs.h for #18669
#include <qplatformdefs.h>
class TestClass : public QObject
{
Q_OBJECT
public Q_SLOTS:
// Method named "open" to test if #18669 is fixed
void open();
// -- Mac
#ifndef Q_OS_MAC
void MacNotDef();
......
......@@ -39,8 +39,7 @@ endif()
# Qt5 only tests
if(QT_TEST_VERSION GREATER 4)
ADD_AUTOGEN_TEST(MocMacroName mocMacroName)
# Disabled for issue #18669
#ADD_AUTOGEN_TEST(MocOsMacros)
ADD_AUTOGEN_TEST(MocOsMacros)
ADD_AUTOGEN_TEST(RerunMocPlugin)
if(APPLE)
ADD_AUTOGEN_TEST(MacOsFW)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment