diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-07-20 20:35:05 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-07-21 15:03:40 (GMT) |
commit | 0e434fcf0428f43dcc5f540ca0a61e078c9f4b4c (patch) | |
tree | 598fd1f91b2855d43064db6d5afb18687efaf155 /Tests/QtAutogen | |
parent | af9708881f4c2d8f501ae63a4088c020edb6f070 (diff) | |
download | CMake-0e434fcf0428f43dcc5f540ca0a61e078c9f4b4c.zip CMake-0e434fcf0428f43dcc5f540ca0a61e078c9f4b4c.tar.gz CMake-0e434fcf0428f43dcc5f540ca0a61e078c9f4b4c.tar.bz2 |
Autogen: Move repeated tests to new QtAutogenRerun test
By moving QtAutogen tests that run repeatedly to a new QtAutogenRerun
test, the `ctest -R Qt[45]Autogen -j4` call runs approximately 25%
faster.
Diffstat (limited to 'Tests/QtAutogen')
34 files changed, 0 insertions, 508 deletions
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index b3e83fd..5064d26 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -2,13 +2,6 @@ cmake_minimum_required(VERSION 3.9) cmake_policy(SET CMP0071 NEW) project(QtAutogen) -# Tell find_package(Qt5) where to find Qt. -if(QT_QMAKE_EXECUTABLE) - get_filename_component(Qt_BIN_DIR "${QT_QMAKE_EXECUTABLE}" PATH) - get_filename_component(Qt_PREFIX_DIR "${Qt_BIN_DIR}" PATH) - set(CMAKE_PREFIX_PATH ${Qt_PREFIX_DIR}) -endif() - if (QT_TEST_VERSION STREQUAL 4) find_package(Qt4 REQUIRED) @@ -108,132 +101,6 @@ set_target_properties(no_link_language PROPERTIES AUTOMOC TRUE) target_compile_features(no_link_language PRIVATE ${QT_COMPILE_FEATURES}) target_compile_features(empty PRIVATE ${QT_COMPILE_FEATURES}) -# -- Test -# When a file listed in a .qrc file changes the target must be rebuilt -set(timeformat "%Y%j%H%M%S") -set(RCC_DEPENDS_SRC "${CMAKE_CURRENT_SOURCE_DIR}/rccDepends") -set(RCC_DEPENDS_BIN "${CMAKE_CURRENT_BINARY_DIR}/rccDepends") -configure_file(${RCC_DEPENDS_SRC}/res1a.qrc.in ${RCC_DEPENDS_BIN}/res1.qrc COPYONLY) -configure_file(${RCC_DEPENDS_SRC}/res2a.qrc.in ${RCC_DEPENDS_BIN}/res2.qrc.in COPYONLY) -try_compile(RCC_DEPENDS - "${RCC_DEPENDS_BIN}" - "${RCC_DEPENDS_SRC}" - rccDepends - CMAKE_FLAGS "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}" - "-DQT_TEST_VERSION=${QT_TEST_VERSION}" - "-DCMAKE_PREFIX_PATH=${Qt_PREFIX_DIR}" - OUTPUT_VARIABLE output -) -if (NOT RCC_DEPENDS) - message(SEND_ERROR "Initial build of rccDepends failed. Output: ${output}") -endif() -# Get name and timestamp of the output binary -file(STRINGS "${RCC_DEPENDS_BIN}/target.txt" targetList ENCODING UTF-8) -list(GET targetList 0 rccDependsBin) -file(TIMESTAMP "${rccDependsBin}" timeBegin "${timeformat}") -# Sleep, touch regular qrc input file, rebuild and compare timestamp -execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change. -execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${RCC_DEPENDS_BIN}/res1/input.txt") -execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result) -if (result) - message(SEND_ERROR "Second build of rccDepends failed.") -endif() -file(TIMESTAMP "${rccDependsBin}" timeStep1 "${timeformat}") -if (NOT timeStep1 GREATER timeBegin) - message(SEND_ERROR "File (${rccDependsBin}) should have changed in the first step!") -endif() -# Sleep, update regular qrc file, rebuild and compare timestamp -execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change. -configure_file(${RCC_DEPENDS_SRC}/res1b.qrc.in ${RCC_DEPENDS_BIN}/res1.qrc COPYONLY) -execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result) -if (result) - message(SEND_ERROR "Third build of rccDepends failed.") -endif() -file(TIMESTAMP "${rccDependsBin}" timeStep2 "${timeformat}") -if (NOT timeStep2 GREATER timeStep1) - message(SEND_ERROR "File (${rccDependsBin}) should have changed in the second step!") -endif() -# Sleep, touch regular qrc newly added input file, rebuild and compare timestamp -execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change. -execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${RCC_DEPENDS_BIN}/res1/inputAdded.txt") -execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result) -if (result) - message(SEND_ERROR "Fourth build of rccDepends failed.") -endif() -file(TIMESTAMP "${rccDependsBin}" timeStep3 "${timeformat}") -if (NOT timeStep3 GREATER timeStep2) - message(SEND_ERROR "File (${rccDependsBin}) should have changed in the third step!") -endif() -# Sleep, touch generated qrc input file, rebuild and compare timestamp -execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change. -execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${RCC_DEPENDS_BIN}/res2/input.txt") -execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result) -if (result) - message(SEND_ERROR "Fifth build of rccDepends failed.") -endif() -file(TIMESTAMP "${rccDependsBin}" timeStep4 "${timeformat}") -if (NOT timeStep4 GREATER timeStep3) - message(SEND_ERROR "File (${rccDependsBin}) should have changed in the fourth step!") -endif() -# Sleep, update generated qrc file, rebuild and compare timestamp -execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change. -configure_file(${RCC_DEPENDS_SRC}/res2b.qrc.in ${RCC_DEPENDS_BIN}/res2.qrc.in COPYONLY) -execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result) -if (result) - message(SEND_ERROR "Sixth build of rccDepends failed.") -endif() -file(TIMESTAMP "${rccDependsBin}" timeStep5 "${timeformat}") -if (NOT timeStep5 GREATER timeStep4) - message(SEND_ERROR "File (${rccDependsBin}) should have changed in the fitfh step!") -endif() -# Sleep, touch generated qrc newly added input file, rebuild and compare timestamp -execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change. -execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${RCC_DEPENDS_BIN}/res2/inputAdded.txt") -execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result) -if (result) - message(SEND_ERROR "Seventh build of rccDepends failed.") -endif() -file(TIMESTAMP "${rccDependsBin}" timeStep6 "${timeformat}") -if (NOT timeStep6 GREATER timeStep5) - message(SEND_ERROR "File (${rccDependsBin}) should have changed in the sixth step!") -endif() - - -# -- Test -# Ensure a repeated build succeeds when a header containing a QObject changes -set(timeformat "%Y%j%H%M%S") -configure_file(mocRerun/test1a.h.in mocRerun/test1.h COPYONLY) -try_compile(MOC_RERUN - "${CMAKE_CURRENT_BINARY_DIR}/mocRerun" - "${CMAKE_CURRENT_SOURCE_DIR}/mocRerun" - mocRerun - CMAKE_FLAGS "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}" - "-DQT_TEST_VERSION=${QT_TEST_VERSION}" - "-DCMAKE_PREFIX_PATH=${Qt_PREFIX_DIR}" - OUTPUT_VARIABLE output -) -if (NOT MOC_RERUN) - message(SEND_ERROR "Initial build of mocRerun failed. Output: ${output}") -endif() -# Get name and timestamp of the output binary -file(STRINGS "${CMAKE_CURRENT_BINARY_DIR}/mocRerun/target1.txt" target1List ENCODING UTF-8) -list(GET target1List 0 binFile) -file(TIMESTAMP "${binFile}" timeBegin "${timeformat}") -# Change file content and rebuild -execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) -configure_file(mocRerun/test1b.h.in mocRerun/test1.h COPYONLY) -execute_process(COMMAND "${CMAKE_COMMAND}" --build . - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mocRerun" - RESULT_VARIABLE mocRerun_result - ) -if (mocRerun_result) - message(SEND_ERROR "Second build of mocRerun failed.") -endif() -# Compare timestamps -file(TIMESTAMP "${binFile}" timeStep1 "${timeformat}") -if (NOT timeStep1 GREATER timeBegin) - message(SEND_ERROR "File (${binFile}) should have changed in the first step!") -endif() # -- Test # Test for SKIP_AUTOMOC and SKIP_AUTOGEN on an AUTOMOC enabled target @@ -322,76 +189,6 @@ if(ALLOW_WRAP_CPP) endif() # -- Test -# Tests Q_PLUGIN_METADATA json file change detection -if (NOT QT_TEST_VERSION STREQUAL 4) - try_compile(MOC_PLUGIN - "${CMAKE_CURRENT_BINARY_DIR}/mocPlugin" - "${CMAKE_CURRENT_SOURCE_DIR}/mocPlugin" - mocPlugin - CMAKE_FLAGS "-DQT_TEST_VERSION=${QT_TEST_VERSION}" - "-DCMAKE_PREFIX_PATH=${Qt_PREFIX_DIR}" - OUTPUT_VARIABLE output - ) - if (NOT MOC_PLUGIN) - message(SEND_ERROR "Initial build of mocPlugin failed. Output: ${output}") - endif() - - set(timeformat "%Y%j%H%M%S") - set(mocPlugSrcDir "${CMAKE_CURRENT_SOURCE_DIR}/mocPlugin") - set(mocPlugBinDir "${CMAKE_CURRENT_BINARY_DIR}/mocPlugin") - find_library(plAFile "PlugA" PATHS "${mocPlugBinDir}/Debug" "${mocPlugBinDir}" NO_DEFAULT_PATH) - find_library(plBFile "PlugB" PATHS "${mocPlugBinDir}/Debug" "${mocPlugBinDir}" NO_DEFAULT_PATH) - find_library(plCFile "PlugC" PATHS "${mocPlugBinDir}/Debug" "${mocPlugBinDir}" NO_DEFAULT_PATH) - find_library(plDFile "PlugD" PATHS "${mocPlugBinDir}/Debug" "${mocPlugBinDir}" NO_DEFAULT_PATH) - - file(TIMESTAMP "${plAFile}" plABefore "${timeformat}") - file(TIMESTAMP "${plBFile}" plBBefore "${timeformat}") - file(TIMESTAMP "${plCFile}" plCBefore "${timeformat}") - file(TIMESTAMP "${plDFile}" plDBefore "${timeformat}") - - # Ensure that the timestamp will change and change the json files - execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) - configure_file("${mocPlugSrcDir}/jsonIn/StyleD.json" "${mocPlugBinDir}/jsonFiles/StyleC.json") - configure_file("${mocPlugSrcDir}/jsonIn/StyleC.json" "${mocPlugBinDir}/jsonFiles/sub/StyleD.json") - execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${mocPlugBinDir}") - - file(TIMESTAMP "${plAFile}" plAAfter "${timeformat}") - file(TIMESTAMP "${plBFile}" plBAfter "${timeformat}") - file(TIMESTAMP "${plCFile}" plCAfter "${timeformat}") - file(TIMESTAMP "${plDFile}" plDAfter "${timeformat}") - - if (plAAfter GREATER plABefore) - message(SEND_ERROR "file (${plAFile}) should not have changed!") - endif() - if (plBAfter GREATER plBBefore) - message(SEND_ERROR "file (${plBFile}) should not have changed!") - endif() - if (NOT plCAfter GREATER plCBefore) - message(SEND_ERROR "file (${plCFile}) should have changed!") - endif() - if (NOT plDAfter GREATER plDBefore) - message(SEND_ERROR "file (${plDFile}) should have changed!") - endif() - - # Test custom macro - file(TIMESTAMP "${plCFile}" plCBefore "${timeformat}") - file(TIMESTAMP "${plDFile}" plDBefore "${timeformat}") - execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) - configure_file("${mocPlugSrcDir}/jsonIn/StyleD.json" "${mocPlugBinDir}/jsonFiles/StyleC_Custom.json") - configure_file("${mocPlugSrcDir}/jsonIn/StyleC.json" "${mocPlugBinDir}/jsonFiles/sub/StyleD_Custom.json") - execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${mocPlugBinDir}") - file(TIMESTAMP "${plCFile}" plCAfter "${timeformat}") - file(TIMESTAMP "${plDFile}" plDAfter "${timeformat}") - if (NOT plCAfter GREATER plCBefore) - message(SEND_ERROR "file (${plCFile}) should have changed!") - endif() - if (NOT plDAfter GREATER plDBefore) - message(SEND_ERROR "file (${plDFile}) should have changed!") - endif() - -endif() - -# -- Test # Tests various .ui include directories add_subdirectory(uicInclude) diff --git a/Tests/QtAutogen/mocPlugin/CMakeLists.txt b/Tests/QtAutogen/mocPlugin/CMakeLists.txt deleted file mode 100644 index 9b224fb..0000000 --- a/Tests/QtAutogen/mocPlugin/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -cmake_minimum_required(VERSION 3.9) -project(mocPlugin CXX) - -set(CMAKE_AUTOMOC_DEPEND_FILTERS - "A_CUSTOM_MACRO" - "[\n][ \t]*A_CUSTOM_MACRO[ \t\r\n]*\\([^,]+,[ \t\r\n]*\"([^\"]+)\"" - ) - -if (NOT QT_TEST_VERSION STREQUAL 5) - message(SEND_ERROR "Invalid Qt version specified.") -endif() -find_package(Qt5Widgets REQUIRED) - -if(Qt5_POSITION_INDEPENDENT_CODE AND CMAKE_CXX_COMPILE_OPTIONS_PIC) - add_definitions(${CMAKE_CXX_COMPILE_OPTIONS_PIC}) -endif() - -configure_file(jsonIn/StyleC.json jsonFiles/StyleC.json) -configure_file(jsonIn/StyleD.json jsonFiles/sub/StyleD.json) -configure_file(jsonIn/StyleC.json jsonFiles/StyleC_Custom.json) -configure_file(jsonIn/StyleD.json jsonFiles/sub/StyleD_Custom.json) - -# Enable automoc -set(CMAKE_AUTOMOC TRUE) - -include_directories("${CMAKE_CURRENT_BINARY_DIR}/jsonFiles") -link_libraries(Qt5::Widgets) - -add_library(PlugA STATIC StyleA.cpp) -add_library(PlugB STATIC StyleB.cpp) -add_library(PlugC STATIC StyleC.cpp) -add_library(PlugD STATIC StyleD.cpp) -add_library(PlugE STATIC StyleE.cpp) diff --git a/Tests/QtAutogen/mocPlugin/StyleA.cpp b/Tests/QtAutogen/mocPlugin/StyleA.cpp deleted file mode 100644 index b5e8753..0000000 --- a/Tests/QtAutogen/mocPlugin/StyleA.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "StyleA.hpp" - -QStyle* StyleA::create(const QString& key) -{ - return 0; -} diff --git a/Tests/QtAutogen/mocPlugin/StyleA.hpp b/Tests/QtAutogen/mocPlugin/StyleA.hpp deleted file mode 100644 index 1b6154d..0000000 --- a/Tests/QtAutogen/mocPlugin/StyleA.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef STYLEA_HPP -#define STYLEA_HPP - -#include "StyleCommon.hpp" -#include <QStylePlugin> - -class StyleA : public QStylePlugin -{ - Q_OBJECT - // Json file in local directory - Q_PLUGIN_METADATA(IID "org.styles.A" FILE "StyleA.json") - A_CUSTOM_MACRO(SomeArg, "StyleA_Custom.json", AnotherArg) -public: - QStyle* create(const QString& key); -}; - -#endif diff --git a/Tests/QtAutogen/mocPlugin/StyleA.json b/Tests/QtAutogen/mocPlugin/StyleA.json deleted file mode 100644 index cc33953..0000000 --- a/Tests/QtAutogen/mocPlugin/StyleA.json +++ /dev/null @@ -1 +0,0 @@ -{ "Keys": [ "Rocket", "Starbuster" ] } diff --git a/Tests/QtAutogen/mocPlugin/StyleA_Custom.json b/Tests/QtAutogen/mocPlugin/StyleA_Custom.json deleted file mode 100644 index cc33953..0000000 --- a/Tests/QtAutogen/mocPlugin/StyleA_Custom.json +++ /dev/null @@ -1 +0,0 @@ -{ "Keys": [ "Rocket", "Starbuster" ] } diff --git a/Tests/QtAutogen/mocPlugin/StyleB.cpp b/Tests/QtAutogen/mocPlugin/StyleB.cpp deleted file mode 100644 index 17d4400..0000000 --- a/Tests/QtAutogen/mocPlugin/StyleB.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "StyleB.hpp" - -QStyle* StyleB::create(const QString& key) -{ - return 0; -} diff --git a/Tests/QtAutogen/mocPlugin/StyleB.hpp b/Tests/QtAutogen/mocPlugin/StyleB.hpp deleted file mode 100644 index 163c9b2..0000000 --- a/Tests/QtAutogen/mocPlugin/StyleB.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef STYLEB_HPP -#define STYLEB_HPP - -#include "StyleCommon.hpp" -#include <QStylePlugin> - -class StyleB : public QStylePlugin -{ - Q_OBJECT - // Json file in local subdirectory - Q_PLUGIN_METADATA(IID "org.styles.B" FILE "jsonIn/StyleB.json") - A_CUSTOM_MACRO(SomeArg, "jsonIn/StyleB_Custom.json", AnotherArg) -public: - QStyle* create(const QString& key); -}; - -#endif diff --git a/Tests/QtAutogen/mocPlugin/StyleC.cpp b/Tests/QtAutogen/mocPlugin/StyleC.cpp deleted file mode 100644 index 37e7564..0000000 --- a/Tests/QtAutogen/mocPlugin/StyleC.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "StyleC.hpp" - -QStyle* StyleC::create(const QString& key) -{ - return 0; -} diff --git a/Tests/QtAutogen/mocPlugin/StyleC.hpp b/Tests/QtAutogen/mocPlugin/StyleC.hpp deleted file mode 100644 index 52a887a..0000000 --- a/Tests/QtAutogen/mocPlugin/StyleC.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef STYLEC_HPP -#define STYLEC_HPP - -#include "StyleCommon.hpp" -#include <QStylePlugin> - -class StyleC : public QStylePlugin -{ - Q_OBJECT - // Json file in global root directory - Q_PLUGIN_METADATA(IID "org.styles.C" FILE "StyleC.json") - A_CUSTOM_MACRO(SomeArg, "StyleC_Custom.json", AnotherArg) -public: - QStyle* create(const QString& key); -}; - -#endif diff --git a/Tests/QtAutogen/mocPlugin/StyleCommon.hpp b/Tests/QtAutogen/mocPlugin/StyleCommon.hpp deleted file mode 100644 index f1a7ec6..0000000 --- a/Tests/QtAutogen/mocPlugin/StyleCommon.hpp +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef STYLECOMMON_HPP -#define STYLECOMMON_HPP - -// Empty test macro definition -#define A_CUSTOM_MACRO(name, jsonFile, pluginRegistrations) - -#endif diff --git a/Tests/QtAutogen/mocPlugin/StyleD.cpp b/Tests/QtAutogen/mocPlugin/StyleD.cpp deleted file mode 100644 index 7e4b121..0000000 --- a/Tests/QtAutogen/mocPlugin/StyleD.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "StyleD.hpp" - -QStyle* StyleD::create(const QString& key) -{ - return 0; -} diff --git a/Tests/QtAutogen/mocPlugin/StyleD.hpp b/Tests/QtAutogen/mocPlugin/StyleD.hpp deleted file mode 100644 index df8a439..0000000 --- a/Tests/QtAutogen/mocPlugin/StyleD.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef STYLED_HPP -#define STYLED_HPP - -#include "StyleCommon.hpp" -#include <QStylePlugin> - -class StyleD : public QStylePlugin -{ - Q_OBJECT - // Json file in global sub director - Q_PLUGIN_METADATA(IID "org.styles.D" FILE "sub/StyleD.json") - A_CUSTOM_MACRO(SomeArg, "sub/StyleD_Custom.json", AnotherArg) -public: - QStyle* create(const QString& key); -}; - -#endif diff --git a/Tests/QtAutogen/mocPlugin/StyleE.cpp b/Tests/QtAutogen/mocPlugin/StyleE.cpp deleted file mode 100644 index 8fc9a7f..0000000 --- a/Tests/QtAutogen/mocPlugin/StyleE.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "StyleE.hpp" - -QStyle* StyleE::create(const QString& key) -{ - return 0; -} diff --git a/Tests/QtAutogen/mocPlugin/StyleE.hpp b/Tests/QtAutogen/mocPlugin/StyleE.hpp deleted file mode 100644 index e7915a8..0000000 --- a/Tests/QtAutogen/mocPlugin/StyleE.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef STYLEE_HPP -#define STYLEE_HPP - -#include "StyleCommon.hpp" -#include <QStylePlugin> - -class StyleE : public QStylePlugin -{ - Q_OBJECT - // No Json file - Q_PLUGIN_METADATA(IID "org.styles.E") - A_CUSTOM_MACRO(SomeArg, InvalidFileArg, AnotherArg) -public: - QStyle* create(const QString& key); -}; - -#endif diff --git a/Tests/QtAutogen/mocPlugin/jsonIn/StyleB.json b/Tests/QtAutogen/mocPlugin/jsonIn/StyleB.json deleted file mode 100644 index 129cac4..0000000 --- a/Tests/QtAutogen/mocPlugin/jsonIn/StyleB.json +++ /dev/null @@ -1 +0,0 @@ -{ "Keys": [ "Rocket", "StarbusterB" ] } diff --git a/Tests/QtAutogen/mocPlugin/jsonIn/StyleB_Custom.json b/Tests/QtAutogen/mocPlugin/jsonIn/StyleB_Custom.json deleted file mode 100644 index 129cac4..0000000 --- a/Tests/QtAutogen/mocPlugin/jsonIn/StyleB_Custom.json +++ /dev/null @@ -1 +0,0 @@ -{ "Keys": [ "Rocket", "StarbusterB" ] } diff --git a/Tests/QtAutogen/mocPlugin/jsonIn/StyleC.json b/Tests/QtAutogen/mocPlugin/jsonIn/StyleC.json deleted file mode 100644 index 119aaa4..0000000 --- a/Tests/QtAutogen/mocPlugin/jsonIn/StyleC.json +++ /dev/null @@ -1 +0,0 @@ -{ "Keys": [ "Boat", "Ship" ] } diff --git a/Tests/QtAutogen/mocPlugin/jsonIn/StyleD.json b/Tests/QtAutogen/mocPlugin/jsonIn/StyleD.json deleted file mode 100644 index 732c547..0000000 --- a/Tests/QtAutogen/mocPlugin/jsonIn/StyleD.json +++ /dev/null @@ -1 +0,0 @@ -{ "Keys": [ "Bike", "Car" ] } diff --git a/Tests/QtAutogen/mocPlugin/main.cpp b/Tests/QtAutogen/mocPlugin/main.cpp deleted file mode 100644 index 3ba2ddc..0000000 --- a/Tests/QtAutogen/mocPlugin/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "StyleA.hpp" - -int main(int argv, char** args) -{ - return 0; -} diff --git a/Tests/QtAutogen/mocRerun/CMakeLists.txt b/Tests/QtAutogen/mocRerun/CMakeLists.txt deleted file mode 100644 index 7380bdd..0000000 --- a/Tests/QtAutogen/mocRerun/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -cmake_minimum_required(VERSION 3.9) -cmake_policy(SET CMP0071 NEW) -project(mocRerun 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() - -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) - -# Generated source file -add_custom_command(OUTPUT main.cpp - COMMAND ${CMAKE_COMMAND} -E sleep 2 - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/main.cpp - ) - -add_executable(mocRerun - ${CMAKE_CURRENT_BINARY_DIR}/test1.h - ${CMAKE_CURRENT_BINARY_DIR}/main.cpp - res1.qrc - ) -target_include_directories(mocRerun PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) -target_link_libraries(mocRerun ${QT_CORE_TARGET}) -# Write target name to text file -add_custom_command(TARGET mocRerun POST_BUILD COMMAND - ${CMAKE_COMMAND} -E echo "$<TARGET_FILE:mocRerun>" > target1.txt) diff --git a/Tests/QtAutogen/mocRerun/input.txt b/Tests/QtAutogen/mocRerun/input.txt deleted file mode 100644 index da62762..0000000 --- a/Tests/QtAutogen/mocRerun/input.txt +++ /dev/null @@ -1 +0,0 @@ -Res1 input. diff --git a/Tests/QtAutogen/mocRerun/main.cpp.in b/Tests/QtAutogen/mocRerun/main.cpp.in deleted file mode 100644 index b37ff61..0000000 --- a/Tests/QtAutogen/mocRerun/main.cpp.in +++ /dev/null @@ -1,18 +0,0 @@ -#include "test1.h" - -class Test2 : public QObject -{ - Q_OBJECT -public slots: - void onTst1() {} -}; - -int main() -{ - Test1 test1; - Test2 test2; - - return 0; -} - -#include "main.moc" diff --git a/Tests/QtAutogen/mocRerun/res1.qrc b/Tests/QtAutogen/mocRerun/res1.qrc deleted file mode 100644 index fb804b5..0000000 --- a/Tests/QtAutogen/mocRerun/res1.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>input.txt</file> - </qresource> -</RCC> diff --git a/Tests/QtAutogen/mocRerun/test1a.h.in b/Tests/QtAutogen/mocRerun/test1a.h.in deleted file mode 100644 index a335046..0000000 --- a/Tests/QtAutogen/mocRerun/test1a.h.in +++ /dev/null @@ -1,8 +0,0 @@ -#include <QObject> -class Test1 : public QObject -{ - Q_OBJECT -public slots: - void onTst1() {} - void onTst2() {} -}; diff --git a/Tests/QtAutogen/mocRerun/test1b.h.in b/Tests/QtAutogen/mocRerun/test1b.h.in deleted file mode 100644 index 6128eeb..0000000 --- a/Tests/QtAutogen/mocRerun/test1b.h.in +++ /dev/null @@ -1,7 +0,0 @@ -#include <QObject> -class Test1 : public QObject -{ - Q_OBJECT -public slots: - void onTst1() {} -}; diff --git a/Tests/QtAutogen/rccDepends/CMakeLists.txt b/Tests/QtAutogen/rccDepends/CMakeLists.txt deleted file mode 100644 index edc0ac3..0000000 --- a/Tests/QtAutogen/rccDepends/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -cmake_minimum_required(VERSION 3.9) -project(rccDepends CXX) - -set(CMAKE_AUTORCC ON) - -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() - -configure_file(res/input1.txt.in res1/input.txt COPYONLY) -configure_file(res/input1.txt.in res1/inputAdded.txt COPYONLY) -configure_file(res/input2.txt.in res2/input.txt COPYONLY) -configure_file(res/input2.txt.in res2/inputAdded.txt COPYONLY) -# Dependency generated qrc file -add_custom_command(OUTPUT res2.qrc - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc.in - COMMAND ${CMAKE_COMMAND} -E sleep 2 - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc - ) - -add_executable(rccDepends - main.cpp - ${CMAKE_CURRENT_BINARY_DIR}/res1.qrc - ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc ) -target_link_libraries(rccDepends ${QT_CORE_TARGET}) -add_custom_command(TARGET rccDepends POST_BUILD COMMAND - ${CMAKE_COMMAND} -E echo "$<TARGET_FILE:rccDepends>" > target.txt) diff --git a/Tests/QtAutogen/rccDepends/main.cpp b/Tests/QtAutogen/rccDepends/main.cpp deleted file mode 100644 index 766b775..0000000 --- a/Tests/QtAutogen/rccDepends/main.cpp +++ /dev/null @@ -1,5 +0,0 @@ - -int main() -{ - return 0; -} diff --git a/Tests/QtAutogen/rccDepends/res/input1.txt.in b/Tests/QtAutogen/rccDepends/res/input1.txt.in deleted file mode 100644 index da62762..0000000 --- a/Tests/QtAutogen/rccDepends/res/input1.txt.in +++ /dev/null @@ -1 +0,0 @@ -Res1 input. diff --git a/Tests/QtAutogen/rccDepends/res/input2.txt.in b/Tests/QtAutogen/rccDepends/res/input2.txt.in deleted file mode 100644 index 08e14b7..0000000 --- a/Tests/QtAutogen/rccDepends/res/input2.txt.in +++ /dev/null @@ -1 +0,0 @@ -Res2 input. diff --git a/Tests/QtAutogen/rccDepends/res1a.qrc.in b/Tests/QtAutogen/rccDepends/res1a.qrc.in deleted file mode 100644 index d111ffb..0000000 --- a/Tests/QtAutogen/rccDepends/res1a.qrc.in +++ /dev/null @@ -1,5 +0,0 @@ -<RCC> - <qresource prefix="/Texts1"> - <file>res1/input.txt</file> - </qresource> -</RCC> diff --git a/Tests/QtAutogen/rccDepends/res1b.qrc.in b/Tests/QtAutogen/rccDepends/res1b.qrc.in deleted file mode 100644 index 4cb3f04..0000000 --- a/Tests/QtAutogen/rccDepends/res1b.qrc.in +++ /dev/null @@ -1,6 +0,0 @@ -<RCC> - <qresource prefix="/Texts1"> - <file>res1/input.txt</file> - <file alias="Added">res1/inputAdded.txt</file> - </qresource> -</RCC> diff --git a/Tests/QtAutogen/rccDepends/res2a.qrc.in b/Tests/QtAutogen/rccDepends/res2a.qrc.in deleted file mode 100644 index 19f34ac..0000000 --- a/Tests/QtAutogen/rccDepends/res2a.qrc.in +++ /dev/null @@ -1,5 +0,0 @@ -<RCC> - <qresource prefix="/Texts2"> - <file>res2/input.txt</file> - </qresource> -</RCC> diff --git a/Tests/QtAutogen/rccDepends/res2b.qrc.in b/Tests/QtAutogen/rccDepends/res2b.qrc.in deleted file mode 100644 index 19e8ba1..0000000 --- a/Tests/QtAutogen/rccDepends/res2b.qrc.in +++ /dev/null @@ -1,6 +0,0 @@ -<RCC> - <qresource prefix="/Texts2"> - <file>res2/input.txt</file> - <file alias="Added">res2/inputAdded.txt</file> - </qresource> -</RCC> |