summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@web.de>2019-12-30 13:58:26 (GMT)
committerSebastian Holtermann <sebholt@web.de>2020-01-04 10:33:04 (GMT)
commit8c2be3ae94986586aedc3c710694ee7f38296412 (patch)
treea2c3d43f7fcb4c821d594b450a993030605dfb7d
parentabad139c99c861a8bd9a85bd6296ab677a00507a (diff)
downloadCMake-8c2be3ae94986586aedc3c710694ee7f38296412.zip
CMake-8c2be3ae94986586aedc3c710694ee7f38296412.tar.gz
CMake-8c2be3ae94986586aedc3c710694ee7f38296412.tar.bz2
Tests: Restore Autogen/SameName .hh header test
In commit 7fa7f55230fda5ac0135b1f4a220c15ad5983857, the Autogen/SameName test was changed to not test .hh header file processing in AUTOGEN anymore, because we had to revert that feature. Since we now support .hh header file processing in AUTOMOC again, we can restore the Autogen/SameName test for that.
-rw-r--r--Tests/QtAutogen/SameName/CMakeLists.txt6
-rw-r--r--Tests/QtAutogen/SameName/main.cpp2
-rw-r--r--Tests/QtAutogen/SameName/object.hh13
3 files changed, 20 insertions, 1 deletions
diff --git a/Tests/QtAutogen/SameName/CMakeLists.txt b/Tests/QtAutogen/SameName/CMakeLists.txt
index cd29a2a..4ce8dbd 100644
--- a/Tests/QtAutogen/SameName/CMakeLists.txt
+++ b/Tests/QtAutogen/SameName/CMakeLists.txt
@@ -1,7 +1,10 @@
-cmake_minimum_required(VERSION 3.10)
+cmake_minimum_required(VERSION 3.16.0)
project(SameName)
include("../AutogenGuiTest.cmake")
+# Process .hh headers in AUTOMOC
+cmake_policy(SET CMP0100 NEW)
+
# Test AUTOMOC and AUTORCC on source files with the same name
# but in different subdirectories
@@ -18,6 +21,7 @@ add_executable(sameName
ccc/data.qrc
item.cpp
object.h
+ object.hh
object.h++
object.hpp
object.hxx
diff --git a/Tests/QtAutogen/SameName/main.cpp b/Tests/QtAutogen/SameName/main.cpp
index 19a6f6d..725f4cd 100644
--- a/Tests/QtAutogen/SameName/main.cpp
+++ b/Tests/QtAutogen/SameName/main.cpp
@@ -6,6 +6,7 @@
#include "item.hpp"
#include "object.h"
#include "object.h++"
+#include "object.hh"
#include "object.hpp"
#include "object.hxx"
#include "object_upper_ext.H"
@@ -21,6 +22,7 @@ int main(int argv, char** args)
::ccc::Item ccc_item;
// Object instances
::Object_h obj_h;
+ ::Object_hh obj_hh;
::Object_hplpl obj_hplpl;
::Object_hpp obj_hpp;
::Object_hxx obj_hxx;
diff --git a/Tests/QtAutogen/SameName/object.hh b/Tests/QtAutogen/SameName/object.hh
new file mode 100644
index 0000000..3e16f83
--- /dev/null
+++ b/Tests/QtAutogen/SameName/object.hh
@@ -0,0 +1,13 @@
+#ifndef OBJECT_HH
+#define OBJECT_HH
+
+#include <QObject>
+
+class Object_hh : public QObject
+{
+ Q_OBJECT
+ Q_SLOT
+ void go(){};
+};
+
+#endif