diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-12-09 12:50:12 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-12-13 12:50:19 (GMT) |
commit | 540d08f4858ddbb8d0356f77f878b9fbb7af8f80 (patch) | |
tree | 3cb07d93312fd31e754675c4c11260606be79a00 | |
parent | b1504f9f97849777f4690565f8b5879372e7dd51 (diff) | |
download | CMake-540d08f4858ddbb8d0356f77f878b9fbb7af8f80.zip CMake-540d08f4858ddbb8d0356f77f878b9fbb7af8f80.tar.gz CMake-540d08f4858ddbb8d0356f77f878b9fbb7af8f80.tar.bz2 |
Autogen: Tests: Move QtAutoUicInterface test to QtAutogen/UicInterface
-rw-r--r-- | Tests/CMakeLists.txt | 41 | ||||
-rw-r--r-- | Tests/QtAutogen/CommonTests.cmake | 1 | ||||
-rw-r--r-- | Tests/QtAutogen/UicInterface/CMakeLists.txt (renamed from Tests/QtAutoUicInterface/CMakeLists.txt) | 30 | ||||
-rw-r--r-- | Tests/QtAutogen/UicInterface/klocalizedstring.cpp (renamed from Tests/QtAutoUicInterface/klocalizedstring.cpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/UicInterface/klocalizedstring.h (renamed from Tests/QtAutoUicInterface/klocalizedstring.h) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/UicInterface/libwidget.cpp (renamed from Tests/QtAutoUicInterface/libwidget.cpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/UicInterface/libwidget.h (renamed from Tests/QtAutoUicInterface/libwidget.h) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/UicInterface/libwidget.ui (renamed from Tests/QtAutoUicInterface/libwidget.ui) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/UicInterface/main.cpp (renamed from Tests/QtAutoUicInterface/main.cpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/UicInterface/mywidget.cpp (renamed from Tests/QtAutoUicInterface/mywidget.cpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/UicInterface/mywidget.h (renamed from Tests/QtAutoUicInterface/mywidget.h) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/UicInterface/mywidget.ui (renamed from Tests/QtAutoUicInterface/mywidget.ui) | 0 |
12 files changed, 7 insertions, 65 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 46dc224..5d8c2fe 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1242,18 +1242,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/QtAutomocNoQt") - # On Windows there is no RPATH, so while Qt might be available for building, - # the required dlls may not be in the PATH, so we can't run the executables - # on that platform. - if(WIN32) - set(run_autouic_test ${CMAKE_CTEST_COMMAND} -V) - else() - set(run_autouic_test QtAutoUicInterface) - endif() - if(NOT CMAKE_CONFIGURATION_TYPES) - set(QtAutogen_BUILD_OPTIONS -DCMAKE_BUILD_TYPE=$<CONFIGURATION>) - endif() - if(NOT DEFINED CMake_TEST_Qt5) set(CMake_TEST_Qt5 1) endif() @@ -1262,39 +1250,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release endif() if(CMake_TEST_Qt5 AND Qt5Widgets_FOUND) add_subdirectory(Qt5Autogen) - - add_test(Qt5AutoUicInterface ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/QtAutoUicInterface" - "${CMake_BINARY_DIR}/Tests/Qt5AutoUicInterface" - ${build_generator_args} - --build-project QtAutoUicInterface - --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt5AutoUicInterface" - --force-new-ctest-process - --build-options ${build_options} - -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=5 - --test-command ${run_autouic_test} - ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt5AutoUicInterface") endif() if(QT4_WORKS AND QT_QTGUI_FOUND) add_subdirectory(Qt4Autogen) - add_test(Qt4AutoUicInterface ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/QtAutoUicInterface" - "${CMake_BINARY_DIR}/Tests/Qt4AutoUicInterface" - ${build_generator_args} - --build-project QtAutoUicInterface - --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4AutoUicInterface" - --force-new-ctest-process - --build-options ${build_options} - -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} - -DQT_TEST_VERSION=4 - --test-command ${run_autouic_test} - ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4AutoUicInterface") - add_test(Qt4Targets ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/Qt4Targets" diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 5746ab5..c56780e 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -24,6 +24,7 @@ if(QT_TEST_ALLOW_QT_MACROS) ADD_AUTOGEN_TEST(MocCMP0071) endif() ADD_AUTOGEN_TEST(UicInclude uicInclude) +ADD_AUTOGEN_TEST(UicInterface QtAutoUicInterface) ADD_AUTOGEN_TEST(ObjectLibrary someProgram) if(APPLE AND (NOT QT_TEST_VERSION STREQUAL 4)) ADD_AUTOGEN_TEST(MacOsFW) diff --git a/Tests/QtAutoUicInterface/CMakeLists.txt b/Tests/QtAutogen/UicInterface/CMakeLists.txt index a5c2d99..a216aff 100644 --- a/Tests/QtAutoUicInterface/CMakeLists.txt +++ b/Tests/QtAutogen/UicInterface/CMakeLists.txt @@ -1,24 +1,6 @@ - -cmake_minimum_required(VERSION 3.7) - -project(QtAutoUicInterface) - -if (QT_TEST_VERSION STREQUAL 4) - find_package(Qt4 REQUIRED) - - include(UseQt4) - - set(QT_CORE_TARGET Qt4::QtCore) - set(QT_GUI_TARGET Qt4::QtGui) -else() - if (NOT QT_TEST_VERSION STREQUAL 5) - message(SEND_ERROR "Invalid Qt version specified.") - endif() - find_package(Qt5Widgets REQUIRED) - - set(QT_CORE_TARGET Qt5::Core) - set(QT_GUI_TARGET Qt5::Widgets) -endif() +cmake_minimum_required(VERSION 3.10) +project(UicInterface) +include("../AutogenTest.cmake") set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) set(CMAKE_AUTOMOC ON) @@ -29,7 +11,7 @@ set(CMAKE_AUTOUIC ON) set(CMAKE_VERBOSE_MAKEFILE ON) add_library(KI18n klocalizedstring.cpp) -target_link_libraries(KI18n ${QT_CORE_TARGET}) +target_link_libraries(KI18n ${QT_QTCORE_TARGET}) set(autouic_options -tr tr2$<$<NOT:$<BOOL:$<TARGET_PROPERTY:NO_KUIT_SEMANTIC>>>:x>i18n @@ -61,12 +43,12 @@ set(INC_DIR "include" ) endif() add_library(LibWidget libwidget.cpp) -target_link_libraries(LibWidget KI18n ${QT_GUI_TARGET}) +target_link_libraries(LibWidget KI18n ${QT_QTGUI_TARGET}) set_property(TARGET LibWidget PROPERTY NO_KUIT_SEMANTIC ON) set_property(TARGET LibWidget PROPERTY TRANSLATION_DOMAIN customdomain) add_library(MyWidget mywidget.cpp) -target_link_libraries(MyWidget KI18n ${QT_GUI_TARGET}) +target_link_libraries(MyWidget KI18n ${QT_QTGUI_TARGET}) add_executable(QtAutoUicInterface main.cpp) target_compile_definitions(QtAutoUicInterface diff --git a/Tests/QtAutoUicInterface/klocalizedstring.cpp b/Tests/QtAutogen/UicInterface/klocalizedstring.cpp index b629cd1..b629cd1 100644 --- a/Tests/QtAutoUicInterface/klocalizedstring.cpp +++ b/Tests/QtAutogen/UicInterface/klocalizedstring.cpp diff --git a/Tests/QtAutoUicInterface/klocalizedstring.h b/Tests/QtAutogen/UicInterface/klocalizedstring.h index 6129599..6129599 100644 --- a/Tests/QtAutoUicInterface/klocalizedstring.h +++ b/Tests/QtAutogen/UicInterface/klocalizedstring.h diff --git a/Tests/QtAutoUicInterface/libwidget.cpp b/Tests/QtAutogen/UicInterface/libwidget.cpp index 008c22a..008c22a 100644 --- a/Tests/QtAutoUicInterface/libwidget.cpp +++ b/Tests/QtAutogen/UicInterface/libwidget.cpp diff --git a/Tests/QtAutoUicInterface/libwidget.h b/Tests/QtAutogen/UicInterface/libwidget.h index b6f3e82..b6f3e82 100644 --- a/Tests/QtAutoUicInterface/libwidget.h +++ b/Tests/QtAutogen/UicInterface/libwidget.h diff --git a/Tests/QtAutoUicInterface/libwidget.ui b/Tests/QtAutogen/UicInterface/libwidget.ui index 897371e..897371e 100644 --- a/Tests/QtAutoUicInterface/libwidget.ui +++ b/Tests/QtAutogen/UicInterface/libwidget.ui diff --git a/Tests/QtAutoUicInterface/main.cpp b/Tests/QtAutogen/UicInterface/main.cpp index 68bd843..68bd843 100644 --- a/Tests/QtAutoUicInterface/main.cpp +++ b/Tests/QtAutogen/UicInterface/main.cpp diff --git a/Tests/QtAutoUicInterface/mywidget.cpp b/Tests/QtAutogen/UicInterface/mywidget.cpp index 7cf1a13..7cf1a13 100644 --- a/Tests/QtAutoUicInterface/mywidget.cpp +++ b/Tests/QtAutogen/UicInterface/mywidget.cpp diff --git a/Tests/QtAutoUicInterface/mywidget.h b/Tests/QtAutogen/UicInterface/mywidget.h index c23e55d..c23e55d 100644 --- a/Tests/QtAutoUicInterface/mywidget.h +++ b/Tests/QtAutogen/UicInterface/mywidget.h diff --git a/Tests/QtAutoUicInterface/mywidget.ui b/Tests/QtAutogen/UicInterface/mywidget.ui index b2b9cc5..b2b9cc5 100644 --- a/Tests/QtAutoUicInterface/mywidget.ui +++ b/Tests/QtAutogen/UicInterface/mywidget.ui |