summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/MocIncludeStrict
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-12-08 18:40:17 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2017-12-13 12:50:17 (GMT)
commitcc66d356510c51b5240239a212a511fb0d23dc9a (patch)
tree5a844861aebf5ede3030bc2aedad2bea6d02298e /Tests/QtAutogen/MocIncludeStrict
parent7971202b3c58f78008f5b651c048910fcc49c49f (diff)
downloadCMake-cc66d356510c51b5240239a212a511fb0d23dc9a.zip
CMake-cc66d356510c51b5240239a212a511fb0d23dc9a.tar.gz
CMake-cc66d356510c51b5240239a212a511fb0d23dc9a.tar.bz2
Autogen: Tests: Separate MocInclude test
Diffstat (limited to 'Tests/QtAutogen/MocIncludeStrict')
-rw-r--r--Tests/QtAutogen/MocIncludeStrict/CMakeLists.txt10
-rw-r--r--Tests/QtAutogen/MocIncludeStrict/main.cpp26
2 files changed, 36 insertions, 0 deletions
diff --git a/Tests/QtAutogen/MocIncludeStrict/CMakeLists.txt b/Tests/QtAutogen/MocIncludeStrict/CMakeLists.txt
new file mode 100644
index 0000000..2cf0fed
--- /dev/null
+++ b/Tests/QtAutogen/MocIncludeStrict/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 3.10)
+project(MocIncludeStrict)
+include("../AutogenTest.cmake")
+
+# Test moc include patterns
+set(CMAKE_AUTOMOC_RELAXED_MODE FALSE)
+
+# Shared executable
+set(MOC_INCLUDE_NAME "mocIncludeStrict")
+include(${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/shared.cmake)
diff --git a/Tests/QtAutogen/MocIncludeStrict/main.cpp b/Tests/QtAutogen/MocIncludeStrict/main.cpp
new file mode 100644
index 0000000..5a3148d
--- /dev/null
+++ b/Tests/QtAutogen/MocIncludeStrict/main.cpp
@@ -0,0 +1,26 @@
+#include "EObjA.hpp"
+#include "EObjB.hpp"
+#include "LObjA.hpp"
+#include "LObjB.hpp"
+#include "ObjA.hpp"
+#include "ObjB.hpp"
+#include "SObjA.hpp"
+#include "SObjB.hpp"
+#include "subGlobal/GObj.hpp"
+
+int main(int argv, char** args)
+{
+ subGlobal::GObj gObj;
+ ObjA objA;
+ ObjB objB;
+ LObjA lObjA;
+ LObjB lObjB;
+ EObjA eObjA;
+ EObjB eObjB;
+ SObjA sObjA;
+ SObjB sObjB;
+ return 0;
+}
+
+// Header in global subdirectory
+#include "subGlobal/moc_GObj.cpp"