diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-12-09 12:20:58 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-12-13 12:50:18 (GMT) |
commit | e9fcd1545facf6300181db843260008e1069c7b4 (patch) | |
tree | d8baae614e46dd067ce6ccb3a26e63cd65cab0ae /Tests | |
parent | 54b4ff2aee015768a990cb3fccb79f8e87b38a19 (diff) | |
download | CMake-e9fcd1545facf6300181db843260008e1069c7b4.zip CMake-e9fcd1545facf6300181db843260008e1069c7b4.tar.gz CMake-e9fcd1545facf6300181db843260008e1069c7b4.tar.bz2 |
Autogen: Tests: Separate RerunMocPlugin test
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/QtAutogen/CommonTests.cmake | 3 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt (renamed from Tests/QtAutogenRerun/mocPlugin.cmake) | 17 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt (renamed from Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt) | 20 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA.cpp (renamed from Tests/QtAutogenRerun/mocPlugin/StyleA.cpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA.hpp (renamed from Tests/QtAutogenRerun/mocPlugin/StyleA.hpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA.json (renamed from Tests/QtAutogenRerun/mocPlugin/StyleA.json) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA_Custom.json (renamed from Tests/QtAutogenRerun/mocPlugin/StyleA_Custom.json) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleB.cpp (renamed from Tests/QtAutogenRerun/mocPlugin/StyleB.cpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleB.hpp (renamed from Tests/QtAutogenRerun/mocPlugin/StyleB.hpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleC.cpp (renamed from Tests/QtAutogenRerun/mocPlugin/StyleC.cpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleC.hpp (renamed from Tests/QtAutogenRerun/mocPlugin/StyleC.hpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleD.cpp (renamed from Tests/QtAutogenRerun/mocPlugin/StyleD.cpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleD.hpp (renamed from Tests/QtAutogenRerun/mocPlugin/StyleD.hpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleE.cpp (renamed from Tests/QtAutogenRerun/mocPlugin/StyleE.cpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleE.hpp (renamed from Tests/QtAutogenRerun/mocPlugin/StyleE.hpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleEInclude.hpp (renamed from Tests/QtAutogenRerun/mocPlugin/StyleEInclude.hpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/UtilityMacros.hpp (renamed from Tests/QtAutogenRerun/mocPlugin/UtilityMacros.hpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleB.json (renamed from Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleB.json) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleB_Custom.json (renamed from Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleB_Custom.json) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleC.json (renamed from Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleC.json) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleD.json (renamed from Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleD.json) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleE.json (renamed from Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleE.json) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/main.cpp (renamed from Tests/QtAutogenRerun/mocPlugin/main.cpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/dummy.cpp | 5 | ||||
-rw-r--r-- | Tests/QtAutogenRerun/CMakeLists.txt | 6 |
25 files changed, 29 insertions, 22 deletions
diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 94413a3..b03c282 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -33,3 +33,6 @@ ADD_AUTOGEN_TEST(StaticLibraryCycle slc) ADD_AUTOGEN_TEST(Complex QtAutogen) # Rerun tests ADD_AUTOGEN_TEST(RerunMocBasic) +if(NOT QT_TEST_VERSION STREQUAL 4) + ADD_AUTOGEN_TEST(RerunMocPlugin) +endif() diff --git a/Tests/QtAutogenRerun/mocPlugin.cmake b/Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt index 7ad5ccb..076de8b 100644 --- a/Tests/QtAutogenRerun/mocPlugin.cmake +++ b/Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt @@ -1,16 +1,25 @@ +cmake_minimum_required(VERSION 3.10) +project(RerunMocPlugin) +include("../AutogenTest.cmake") + +# Tests Q_PLUGIN_METADATA and CMAKE_AUTOMOC_DEPEND_FILTERS +# json file change detection + +# Dummy executable to generate a clean target +add_executable(dummy dummy.cpp) # Utility variables set(timeformat "%Y%j%H%M%S") -set(mocPlugSrcDir "${CMAKE_CURRENT_SOURCE_DIR}/mocPlugin") -set(mocPlugBinDir "${CMAKE_CURRENT_BINARY_DIR}/mocPlugin") +set(mocPlugSrcDir "${CMAKE_CURRENT_SOURCE_DIR}/MocPlugin") +set(mocPlugBinDir "${CMAKE_CURRENT_BINARY_DIR}/MocPlugin") # Initial buid try_compile(MOC_PLUGIN "${mocPlugBinDir}" "${mocPlugSrcDir}" - mocPlugin + MocPlugin CMAKE_FLAGS "-DQT_TEST_VERSION=${QT_TEST_VERSION}" - "-DCMAKE_PREFIX_PATH=${Qt_PREFIX_DIR}" + "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}" OUTPUT_VARIABLE output ) if (NOT MOC_PLUGIN) diff --git a/Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt index b7cc5e9..bc0085f 100644 --- a/Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt @@ -1,19 +1,15 @@ -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]*\"([^\"]+)\"" - ) +cmake_minimum_required(VERSION 3.10) +project(MocPlugin) +include("../../AutogenTest.cmake") 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() +set(CMAKE_AUTOMOC_DEPEND_FILTERS + "A_CUSTOM_MACRO" + "[\n][ \t]*A_CUSTOM_MACRO[ \t\r\n]*\\([^,]+,[ \t\r\n]*\"([^\"]+)\"" +) configure_file(jsonIn/StyleC.json jsonFiles/StyleC.json) configure_file(jsonIn/StyleC.json jsonFiles/StyleC_Custom.json) @@ -22,7 +18,7 @@ configure_file(jsonIn/StyleD.json jsonFiles/sub/StyleD_Custom.json) configure_file(jsonIn/StyleE.json jsonFiles/StyleE.json) configure_file(jsonIn/StyleE.json jsonFiles/StyleE_Custom.json) -# Enable automoc +# Enable AUTOMOC set(CMAKE_AUTOMOC TRUE) include_directories("${CMAKE_CURRENT_BINARY_DIR}/jsonFiles") diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleA.cpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA.cpp index b5e8753..b5e8753 100644 --- a/Tests/QtAutogenRerun/mocPlugin/StyleA.cpp +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA.cpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleA.hpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA.hpp index 35158a4..35158a4 100644 --- a/Tests/QtAutogenRerun/mocPlugin/StyleA.hpp +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA.hpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleA.json b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA.json index cc33953..cc33953 100644 --- a/Tests/QtAutogenRerun/mocPlugin/StyleA.json +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA.json diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleA_Custom.json b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA_Custom.json index cc33953..cc33953 100644 --- a/Tests/QtAutogenRerun/mocPlugin/StyleA_Custom.json +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA_Custom.json diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleB.cpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleB.cpp index 17d4400..17d4400 100644 --- a/Tests/QtAutogenRerun/mocPlugin/StyleB.cpp +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleB.cpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleB.hpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleB.hpp index 15b79c5..15b79c5 100644 --- a/Tests/QtAutogenRerun/mocPlugin/StyleB.hpp +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleB.hpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleC.cpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleC.cpp index 37e7564..37e7564 100644 --- a/Tests/QtAutogenRerun/mocPlugin/StyleC.cpp +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleC.cpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleC.hpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleC.hpp index b0a4115..b0a4115 100644 --- a/Tests/QtAutogenRerun/mocPlugin/StyleC.hpp +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleC.hpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleD.cpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleD.cpp index 7e4b121..7e4b121 100644 --- a/Tests/QtAutogenRerun/mocPlugin/StyleD.cpp +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleD.cpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleD.hpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleD.hpp index 9696aaa..9696aaa 100644 --- a/Tests/QtAutogenRerun/mocPlugin/StyleD.hpp +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleD.hpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleE.cpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleE.cpp index 3448319..3448319 100644 --- a/Tests/QtAutogenRerun/mocPlugin/StyleE.cpp +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleE.cpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleE.hpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleE.hpp index a069034..a069034 100644 --- a/Tests/QtAutogenRerun/mocPlugin/StyleE.hpp +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleE.hpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleEInclude.hpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleEInclude.hpp index f9734db..f9734db 100644 --- a/Tests/QtAutogenRerun/mocPlugin/StyleEInclude.hpp +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleEInclude.hpp diff --git a/Tests/QtAutogenRerun/mocPlugin/UtilityMacros.hpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/UtilityMacros.hpp index 53a4284..53a4284 100644 --- a/Tests/QtAutogenRerun/mocPlugin/UtilityMacros.hpp +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/UtilityMacros.hpp diff --git a/Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleB.json b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleB.json index cd155dc..cd155dc 100644 --- a/Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleB.json +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleB.json diff --git a/Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleB_Custom.json b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleB_Custom.json index 129cac4..129cac4 100644 --- a/Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleB_Custom.json +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleB_Custom.json diff --git a/Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleC.json b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleC.json index 119aaa4..119aaa4 100644 --- a/Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleC.json +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleC.json diff --git a/Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleD.json b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleD.json index 732c547..732c547 100644 --- a/Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleD.json +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleD.json diff --git a/Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleE.json b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleE.json index 5412c94..5412c94 100644 --- a/Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleE.json +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleE.json diff --git a/Tests/QtAutogenRerun/mocPlugin/main.cpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/main.cpp index 3ba2ddc..3ba2ddc 100644 --- a/Tests/QtAutogenRerun/mocPlugin/main.cpp +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/main.cpp diff --git a/Tests/QtAutogen/RerunMocPlugin/dummy.cpp b/Tests/QtAutogen/RerunMocPlugin/dummy.cpp new file mode 100644 index 0000000..4837a76 --- /dev/null +++ b/Tests/QtAutogen/RerunMocPlugin/dummy.cpp @@ -0,0 +1,5 @@ + +int main(int argv, char** args) +{ + return 0; +} diff --git a/Tests/QtAutogenRerun/CMakeLists.txt b/Tests/QtAutogenRerun/CMakeLists.txt index 746ba4a..9f1ee28 100644 --- a/Tests/QtAutogenRerun/CMakeLists.txt +++ b/Tests/QtAutogenRerun/CMakeLists.txt @@ -40,10 +40,4 @@ endif() add_executable(dummy dummy.cpp) # -- Test -# Tests Q_PLUGIN_METADATA json file change detection -if (NOT QT_TEST_VERSION STREQUAL 4) - include("mocPlugin.cmake") -endif() - -# -- Test include("rccDepends.cmake") |