summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-12-08 18:27:10 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2017-12-13 12:48:28 (GMT)
commit7971202b3c58f78008f5b651c048910fcc49c49f (patch)
tree489a6b1b9afba6959c04c59edebd8d28b9a7e4e3 /Tests/QtAutogen
parentfb7e52ca3d920ca1de8b2abb23da3d83db988eca (diff)
downloadCMake-7971202b3c58f78008f5b651c048910fcc49c49f.zip
CMake-7971202b3c58f78008f5b651c048910fcc49c49f.tar.gz
CMake-7971202b3c58f78008f5b651c048910fcc49c49f.tar.bz2
Autogen: Tests: Separate MocDepends test
Diffstat (limited to 'Tests/QtAutogen')
-rw-r--r--Tests/QtAutogen/CMakeLists.txt4
-rw-r--r--Tests/QtAutogen/CommonTests.cmake1
-rw-r--r--Tests/QtAutogen/MocDepends/CMakeLists.txt (renamed from Tests/QtAutogen/mocDepends/CMakeLists.txt)30
-rw-r--r--Tests/QtAutogen/MocDepends/object_invalid.hpp.in (renamed from Tests/QtAutogen/mocDepends/object_invalid.hpp.in)0
-rw-r--r--Tests/QtAutogen/MocDepends/object_valid.hpp.in (renamed from Tests/QtAutogen/mocDepends/object_valid.hpp.in)0
-rw-r--r--Tests/QtAutogen/MocDepends/simpleLib.cpp.in (renamed from Tests/QtAutogen/mocDepends/simpleLib.cpp.in)0
-rw-r--r--Tests/QtAutogen/MocDepends/simpleLib.hpp.in (renamed from Tests/QtAutogen/mocDepends/simpleLib.hpp.in)0
-rw-r--r--Tests/QtAutogen/MocDepends/testATDFile.cpp (renamed from Tests/QtAutogen/mocDepends/testATDFile.cpp)0
-rw-r--r--Tests/QtAutogen/MocDepends/testATDTarget.cpp (renamed from Tests/QtAutogen/mocDepends/testATDTarget.cpp)0
-rw-r--r--Tests/QtAutogen/MocDepends/testGenFile.cpp (renamed from Tests/QtAutogen/mocDepends/testGenFile.cpp)0
-rw-r--r--Tests/QtAutogen/MocDepends/testGenLib.cpp (renamed from Tests/QtAutogen/mocDepends/testGenLib.cpp)0
-rw-r--r--Tests/QtAutogen/MocDepends/testGenLib.hpp (renamed from Tests/QtAutogen/mocDepends/testGenLib.hpp)0
-rw-r--r--Tests/QtAutogen/MocDepends/testGenTarget.cpp (renamed from Tests/QtAutogen/mocDepends/testGenTarget.cpp)0
13 files changed, 10 insertions, 25 deletions
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt
index 6b54b1a..43fc851 100644
--- a/Tests/QtAutogen/CMakeLists.txt
+++ b/Tests/QtAutogen/CMakeLists.txt
@@ -60,10 +60,6 @@ if(NON_ASCII_BDIR AND WIN32)
endif()
# -- Test
-# Tests AUTOMOC with generated sources
-add_subdirectory(mocDepends)
-
-# -- Test
# Tests various include moc patterns
if(ALLOW_WRAP_CPP)
add_subdirectory(mocIncludeStrict)
diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake
index 6a92873..3cd93ab 100644
--- a/Tests/QtAutogen/CommonTests.cmake
+++ b/Tests/QtAutogen/CommonTests.cmake
@@ -15,3 +15,4 @@ ADD_AUTOGEN_TEST(RccSkipSource)
if(NOT QT_TEST_VERSION STREQUAL 4)
ADD_AUTOGEN_TEST(MocMacroName mocMacroName)
endif()
+ADD_AUTOGEN_TEST(MocDepends)
diff --git a/Tests/QtAutogen/mocDepends/CMakeLists.txt b/Tests/QtAutogen/MocDepends/CMakeLists.txt
index 8217b8d..6ea72be 100644
--- a/Tests/QtAutogen/mocDepends/CMakeLists.txt
+++ b/Tests/QtAutogen/MocDepends/CMakeLists.txt
@@ -1,18 +1,6 @@
-cmake_minimum_required(VERSION 3.9)
-cmake_policy(SET CMP0071 NEW)
-project(mocDepends CXX)
-
-if (QT_TEST_VERSION STREQUAL 4)
- find_package(Qt4 REQUIRED)
- set(QT_CORE_TARGET Qt4::QtCore)
-else()
- if (NOT QT_TEST_VERSION STREQUAL 5)
- message(SEND_ERROR "Invalid Qt version specified.")
- endif()
-
- find_package(Qt5Core REQUIRED)
- set(QT_CORE_TARGET Qt5::Core)
-endif()
+cmake_minimum_required(VERSION 3.10)
+project(MocDepends)
+include("../AutogenTest.cmake")
include_directories(${CMAKE_CURRENT_BINARY_DIR})
set(CSD ${CMAKE_CURRENT_SOURCE_DIR})
@@ -42,7 +30,7 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/object_valid.hpp.in ${CBD}/GenFile.hpp)
add_executable(mocDepGenFile testGenFile.cpp ${CBD}/GenFile.hpp)
-target_link_libraries(mocDepGenFile ${QT_CORE_TARGET})
+target_link_libraries(mocDepGenFile ${QT_QTCORE_TARGET})
set_target_properties(mocDepGenFile PROPERTIES AUTOMOC TRUE)
@@ -69,7 +57,7 @@ add_custom_target(mocDepTargetUtil
COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/object_valid.hpp.in ${CBD}/GenTarget.hpp)
add_executable(mocDepTarget testGenTarget.cpp)
-target_link_libraries(mocDepTarget ${QT_CORE_TARGET})
+target_link_libraries(mocDepTarget ${QT_QTCORE_TARGET})
set_target_properties(mocDepTarget PROPERTIES AUTOMOC TRUE)
add_dependencies(mocDepTarget mocDepTargetUtil)
@@ -96,10 +84,10 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/simpleLib.hpp.in ${CBD}/simpleLib.hpp
COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/simpleLib.cpp.in ${CBD}/simpleLib.cpp)
add_library(SimpleLib STATIC ${CBD}/simpleLib.hpp ${CBD}/simpleLib.cpp)
-target_link_libraries(SimpleLib ${QT_CORE_TARGET})
+target_link_libraries(SimpleLib ${QT_QTCORE_TARGET})
add_executable(mocDepGenLib testGenLib.cpp)
-target_link_libraries(mocDepGenLib SimpleLib ${QT_CORE_TARGET})
+target_link_libraries(mocDepGenLib SimpleLib ${QT_QTCORE_TARGET})
set_target_properties(mocDepGenLib PROPERTIES AUTOMOC TRUE)
@@ -122,7 +110,7 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/object_valid.hpp.in ${CBD}/ATDFile.hpp)
add_executable(mocDepATDFile testATDFile.cpp)
-target_link_libraries(mocDepATDFile ${QT_CORE_TARGET})
+target_link_libraries(mocDepATDFile ${QT_QTCORE_TARGET})
set_target_properties(mocDepATDFile PROPERTIES AUTOMOC TRUE)
set_target_properties(mocDepATDFile PROPERTIES AUTOGEN_TARGET_DEPENDS ${CBD}/ATDFile.hpp)
@@ -146,6 +134,6 @@ add_custom_target(mocDepATDTargetUtil
COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/object_valid.hpp.in ${CBD}/ATDTarget.hpp)
add_executable(mocDepATDTarget testATDTarget.cpp)
-target_link_libraries(mocDepATDTarget ${QT_CORE_TARGET})
+target_link_libraries(mocDepATDTarget ${QT_QTCORE_TARGET})
set_target_properties(mocDepATDTarget PROPERTIES AUTOMOC TRUE)
set_target_properties(mocDepATDTarget PROPERTIES AUTOGEN_TARGET_DEPENDS mocDepATDTargetUtil)
diff --git a/Tests/QtAutogen/mocDepends/object_invalid.hpp.in b/Tests/QtAutogen/MocDepends/object_invalid.hpp.in
index 854d9a1..854d9a1 100644
--- a/Tests/QtAutogen/mocDepends/object_invalid.hpp.in
+++ b/Tests/QtAutogen/MocDepends/object_invalid.hpp.in
diff --git a/Tests/QtAutogen/mocDepends/object_valid.hpp.in b/Tests/QtAutogen/MocDepends/object_valid.hpp.in
index f364f7c..f364f7c 100644
--- a/Tests/QtAutogen/mocDepends/object_valid.hpp.in
+++ b/Tests/QtAutogen/MocDepends/object_valid.hpp.in
diff --git a/Tests/QtAutogen/mocDepends/simpleLib.cpp.in b/Tests/QtAutogen/MocDepends/simpleLib.cpp.in
index fa33bd3..fa33bd3 100644
--- a/Tests/QtAutogen/mocDepends/simpleLib.cpp.in
+++ b/Tests/QtAutogen/MocDepends/simpleLib.cpp.in
diff --git a/Tests/QtAutogen/mocDepends/simpleLib.hpp.in b/Tests/QtAutogen/MocDepends/simpleLib.hpp.in
index b65b0cb..b65b0cb 100644
--- a/Tests/QtAutogen/mocDepends/simpleLib.hpp.in
+++ b/Tests/QtAutogen/MocDepends/simpleLib.hpp.in
diff --git a/Tests/QtAutogen/mocDepends/testATDFile.cpp b/Tests/QtAutogen/MocDepends/testATDFile.cpp
index 6bddfcd..6bddfcd 100644
--- a/Tests/QtAutogen/mocDepends/testATDFile.cpp
+++ b/Tests/QtAutogen/MocDepends/testATDFile.cpp
diff --git a/Tests/QtAutogen/mocDepends/testATDTarget.cpp b/Tests/QtAutogen/MocDepends/testATDTarget.cpp
index 831fc26..831fc26 100644
--- a/Tests/QtAutogen/mocDepends/testATDTarget.cpp
+++ b/Tests/QtAutogen/MocDepends/testATDTarget.cpp
diff --git a/Tests/QtAutogen/mocDepends/testGenFile.cpp b/Tests/QtAutogen/MocDepends/testGenFile.cpp
index 7df6e13..7df6e13 100644
--- a/Tests/QtAutogen/mocDepends/testGenFile.cpp
+++ b/Tests/QtAutogen/MocDepends/testGenFile.cpp
diff --git a/Tests/QtAutogen/mocDepends/testGenLib.cpp b/Tests/QtAutogen/MocDepends/testGenLib.cpp
index c14e159..c14e159 100644
--- a/Tests/QtAutogen/mocDepends/testGenLib.cpp
+++ b/Tests/QtAutogen/MocDepends/testGenLib.cpp
diff --git a/Tests/QtAutogen/mocDepends/testGenLib.hpp b/Tests/QtAutogen/MocDepends/testGenLib.hpp
index 408335b..408335b 100644
--- a/Tests/QtAutogen/mocDepends/testGenLib.hpp
+++ b/Tests/QtAutogen/MocDepends/testGenLib.hpp
diff --git a/Tests/QtAutogen/mocDepends/testGenTarget.cpp b/Tests/QtAutogen/MocDepends/testGenTarget.cpp
index 911076e..911076e 100644
--- a/Tests/QtAutogen/mocDepends/testGenTarget.cpp
+++ b/Tests/QtAutogen/MocDepends/testGenTarget.cpp