summaryrefslogtreecommitdiff
path: root/Tests/QtAutogen
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-01-25 19:09:45 +0100
committerBrad King <brad.king@kitware.com>2019-01-28 08:41:37 -0500
commit03dbb62d31d4a115fed09049cf6995ce89d2fabe (patch)
tree4456169913dc7294122ecab14e38d9d566cc50f7 /Tests/QtAutogen
parent5f34bdc7f9f1fd8cca69757b06b3de8fdb4930b7 (diff)
downloadcmake-03dbb62d31d4a115fed09049cf6995ce89d2fabe.tar.gz
Autogen: Reenable passing compiler implicit include directories to moc
Since commit 5990ecb741 (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
Diffstat (limited to 'Tests/QtAutogen')
-rw-r--r--Tests/QtAutogen/MocOsMacros/TestClass.cpp5
-rw-r--r--Tests/QtAutogen/MocOsMacros/TestClass.hpp5
-rw-r--r--Tests/QtAutogen/Tests.cmake3
3 files changed, 11 insertions, 2 deletions
diff --git a/Tests/QtAutogen/MocOsMacros/TestClass.cpp b/Tests/QtAutogen/MocOsMacros/TestClass.cpp
index 340d130b14..13f8fd93aa 100644
--- a/Tests/QtAutogen/MocOsMacros/TestClass.cpp
+++ b/Tests/QtAutogen/MocOsMacros/TestClass.cpp
@@ -1,6 +1,11 @@
#include "TestClass.hpp"
#include <iostream>
+void TestClass::open()
+{
+ std::cout << "open\n";
+}
+
// -- Mac
#ifndef Q_OS_MAC
void TestClass::MacNotDef()
diff --git a/Tests/QtAutogen/MocOsMacros/TestClass.hpp b/Tests/QtAutogen/MocOsMacros/TestClass.hpp
index 53000aa79c..87fd494789 100644
--- a/Tests/QtAutogen/MocOsMacros/TestClass.hpp
+++ b/Tests/QtAutogen/MocOsMacros/TestClass.hpp
@@ -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();
diff --git a/Tests/QtAutogen/Tests.cmake b/Tests/QtAutogen/Tests.cmake
index c53fb4f1d8..096d5e3bd5 100644
--- a/Tests/QtAutogen/Tests.cmake
+++ b/Tests/QtAutogen/Tests.cmake
@@ -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)