diff options
author | Brad King <brad.king@kitware.com> | 2018-11-15 13:37:48 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-11-15 13:38:12 (GMT) |
commit | 64df9ef33a2f4eb9ef0cb17a2844308d9c7f7034 (patch) | |
tree | d085de801e90d747fc9e83289a6f03f955360649 /Tests | |
parent | f21bad80a297e26b886f15f38f4d87cc5ce9687f (diff) | |
parent | e0c26406aa53b5dc4c942017eaf2410d0057aa9a (diff) | |
download | CMake-64df9ef33a2f4eb9ef0cb17a2844308d9c7f7034.zip CMake-64df9ef33a2f4eb9ef0cb17a2844308d9c7f7034.tar.gz CMake-64df9ef33a2f4eb9ef0cb17a2844308d9c7f7034.tar.bz2 |
Merge topic 'autogen_info_write'
e0c26406aa Autogen: Sort tests
83bbfb1d53 Autogen: Add a definitions test to the MocOnly test
01d5e5c460 Autogen: Add and use cmQtAutoGenInitializer::InfoWriter class
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2610
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Qt4Autogen/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/Qt5Autogen/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/QtAutogen/MocOnly/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/QtAutogen/MocOnly/main.cpp | 6 | ||||
-rw-r--r-- | Tests/QtAutogen/Tests.cmake (renamed from Tests/QtAutogen/CommonTests.cmake) | 66 |
5 files changed, 39 insertions, 39 deletions
diff --git a/Tests/Qt4Autogen/CMakeLists.txt b/Tests/Qt4Autogen/CMakeLists.txt index 818e888..68b885b 100644 --- a/Tests/Qt4Autogen/CMakeLists.txt +++ b/Tests/Qt4Autogen/CMakeLists.txt @@ -6,4 +6,4 @@ include("../QtAutogen/TestMacros.cmake") ADD_AUTOGEN_TEST(DefinesTest) # Common tests -include("../QtAutogen/CommonTests.cmake") +include("../QtAutogen/Tests.cmake") diff --git a/Tests/Qt5Autogen/CMakeLists.txt b/Tests/Qt5Autogen/CMakeLists.txt index 527e5ff..49d33cc 100644 --- a/Tests/Qt5Autogen/CMakeLists.txt +++ b/Tests/Qt5Autogen/CMakeLists.txt @@ -3,4 +3,4 @@ set(QT_TEST_VERSION 5) include("../QtAutogen/TestMacros.cmake") # Common tests -include("../QtAutogen/CommonTests.cmake") +include("../QtAutogen/Tests.cmake") diff --git a/Tests/QtAutogen/MocOnly/CMakeLists.txt b/Tests/QtAutogen/MocOnly/CMakeLists.txt index a37a2ae..5377728 100644 --- a/Tests/QtAutogen/MocOnly/CMakeLists.txt +++ b/Tests/QtAutogen/MocOnly/CMakeLists.txt @@ -13,3 +13,5 @@ add_executable(mocOnly ) set_property(TARGET mocOnly PROPERTY AUTOMOC ON) target_link_libraries(mocOnly ${QT_LIBRARIES}) +# Add compile definitions with unusual characters +target_compile_definitions(mocOnly PUBLIC "TOKEN=\"hello\;\"" ) diff --git a/Tests/QtAutogen/MocOnly/main.cpp b/Tests/QtAutogen/MocOnly/main.cpp index 1611f97..b83b806 100644 --- a/Tests/QtAutogen/MocOnly/main.cpp +++ b/Tests/QtAutogen/MocOnly/main.cpp @@ -2,6 +2,7 @@ #include "IncB.hpp" #include "StyleA.hpp" #include "StyleB.hpp" +#include <iostream> int main(int argv, char** args) { @@ -10,5 +11,8 @@ int main(int argv, char** args) IncA incA; IncB incB; - return 0; + // Test the TOKEN definition passed on the command line + std::string token(TOKEN); + std::cout << "std::string(TOKEN): \"" << token << "\"\n"; + return (token == "hello;") ? 0 : -1; } diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/Tests.cmake index 1cd9e7e..5025d43 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/Tests.cmake @@ -1,52 +1,46 @@ -# Autogen tests common for Qt4 and Qt5 +# Qt4 and Qt5 tests +ADD_AUTOGEN_TEST(AutogenOriginDependsOff autogenOriginDependsOff) +ADD_AUTOGEN_TEST(AutogenOriginDependsOn) +ADD_AUTOGEN_TEST(AutogenTargetDepends) ADD_AUTOGEN_TEST(Complex QtAutogen) +ADD_AUTOGEN_TEST(GlobalAutogenTarget) ADD_AUTOGEN_TEST(LowMinimumVersion lowMinimumVersion) ADD_AUTOGEN_TEST(MocOnly mocOnly) ADD_AUTOGEN_TEST(MocOptions mocOptions) -ADD_AUTOGEN_TEST(UicOnly uicOnly) -ADD_AUTOGEN_TEST(RccOnly rccOnly) -ADD_AUTOGEN_TEST(RccEmpty rccEmpty) -ADD_AUTOGEN_TEST(RccOffMocLibrary) -ADD_AUTOGEN_TEST(GlobalAutogenTarget) -if(QT_TEST_ALLOW_QT_MACROS) - ADD_AUTOGEN_TEST(MocSkipSource) -endif() -ADD_AUTOGEN_TEST(UicSkipSource) -ADD_AUTOGEN_TEST(RccSkipSource) -if(QT_TEST_VERSION GREATER 4) - ADD_AUTOGEN_TEST(MocMacroName mocMacroName) -endif() -ADD_AUTOGEN_TEST(AutogenOriginDependsOff autogenOriginDependsOff) -ADD_AUTOGEN_TEST(AutogenOriginDependsOn) -ADD_AUTOGEN_TEST(AutogenTargetDepends) -if(QT_TEST_ALLOW_QT_MACROS) - ADD_AUTOGEN_TEST(MocIncludeStrict mocIncludeStrict) - ADD_AUTOGEN_TEST(MocIncludeRelaxed mocIncludeRelaxed) -endif() -if(QT_TEST_ALLOW_QT_MACROS) - ADD_AUTOGEN_TEST(MocCMP0071) -endif() -if(QT_TEST_VERSION GREATER 4) - ADD_AUTOGEN_TEST(MocOsMacros) -endif() -ADD_AUTOGEN_TEST(UicInclude uicInclude) -ADD_AUTOGEN_TEST(UicInterface QtAutoUicInterface) ADD_AUTOGEN_TEST(ObjectLibrary someProgram) -if(APPLE AND (QT_TEST_VERSION GREATER 4)) - ADD_AUTOGEN_TEST(MacOsFW) -endif() ADD_AUTOGEN_TEST(Parallel parallel) ADD_AUTOGEN_TEST(Parallel1 parallel1) ADD_AUTOGEN_TEST(Parallel2 parallel2) ADD_AUTOGEN_TEST(Parallel3 parallel3) ADD_AUTOGEN_TEST(Parallel4 parallel4) ADD_AUTOGEN_TEST(ParallelAUTO parallelAUTO) +ADD_AUTOGEN_TEST(RccEmpty rccEmpty) +ADD_AUTOGEN_TEST(RccOffMocLibrary) +ADD_AUTOGEN_TEST(RccOnly rccOnly) +ADD_AUTOGEN_TEST(RccSkipSource) +ADD_AUTOGEN_TEST(RerunMocBasic) +ADD_AUTOGEN_TEST(RerunRccConfigChange) +ADD_AUTOGEN_TEST(RerunRccDepends) ADD_AUTOGEN_TEST(SameName sameName) ADD_AUTOGEN_TEST(StaticLibraryCycle slc) -# Rerun tests -ADD_AUTOGEN_TEST(RerunMocBasic) +ADD_AUTOGEN_TEST(UicInclude uicInclude) +ADD_AUTOGEN_TEST(UicInterface QtAutoUicInterface) +ADD_AUTOGEN_TEST(UicOnly uicOnly) +ADD_AUTOGEN_TEST(UicSkipSource) + +if(QT_TEST_ALLOW_QT_MACROS) + ADD_AUTOGEN_TEST(MocCMP0071) + ADD_AUTOGEN_TEST(MocIncludeRelaxed mocIncludeRelaxed) + ADD_AUTOGEN_TEST(MocIncludeStrict mocIncludeStrict) + ADD_AUTOGEN_TEST(MocSkipSource) +endif() + +# Qt5 only tests if(QT_TEST_VERSION GREATER 4) + ADD_AUTOGEN_TEST(MocMacroName mocMacroName) + ADD_AUTOGEN_TEST(MocOsMacros) ADD_AUTOGEN_TEST(RerunMocPlugin) + if(APPLE) + ADD_AUTOGEN_TEST(MacOsFW) + endif() endif() -ADD_AUTOGEN_TEST(RerunRccDepends) -ADD_AUTOGEN_TEST(RerunRccConfigChange) |