summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/CMakeLists.txt
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-11-24 06:42:34 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2017-11-24 06:42:34 +0000
commitfbca13949a28cc3e815b829d814514ab78be6ce1 (patch)
treee4d33beeef01dbe54c5e7d7dd13c5427ce5b496d /tests/auto/cmake/CMakeLists.txt
parentdfa172034e19b6011cc4e7c784b1a5b82996d630 (diff)
parent7c4b0aa9706bdb79f0f79841cf6704e2f613fe69 (diff)
Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into refs/staging/5.10
Diffstat (limited to 'tests/auto/cmake/CMakeLists.txt')
-rw-r--r--tests/auto/cmake/CMakeLists.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index 0e6da23c09..40c86132e9 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -157,7 +157,13 @@ if (NOT CMAKE_VERSION VERSION_LESS 2.8.11 AND NOT NO_WIDGETS)
expect_pass(test_interface)
endif()
-if (NOT CMAKE_VERSION VERSION_LESS 2.8.12)
- expect_pass(test_interface_link_libraries)
- expect_pass(test_moc_macro_target)
+expect_pass(test_interface_link_libraries)
+expect_pass(test_moc_macro_target)
+
+if (NOT CMAKE_VERSION VERSION_LESS 3.8)
+ # With earlier CMake versions, this test would simply run moc multiple times and lead to:
+ # /usr/bin/ld: error: CMakeFiles/mywidget.dir/mywidget_automoc.cpp.o: multiple definition of 'MyWidget::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)'
+ # /usr/bin/ld: CMakeFiles/mywidget.dir/moc_mywidget.cpp.o: previous definition here
+ # Reason: SKIP_* properties were added in CMake 3.8 only
+ expect_pass(test_QTBUG-63422)
endif()