summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt105
-rw-r--r--Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt14
-rw-r--r--Tests/CudaOnly/ResolveDeviceSymbols/main.cu11
-rw-r--r--Tests/GeneratorExpression/CMakeLists.txt8
-rw-r--r--Tests/GeneratorExpression/srcgenex_defs_COMPILE_LANGUAGE.c12
-rw-r--r--Tests/GeneratorExpression/srcgenex_flags_COMPILE_LANGUAGE.c12
-rw-r--r--Tests/Qt4Autogen/CMakeLists.txt9
-rw-r--r--Tests/Qt5Autogen/CMakeLists.txt6
-rw-r--r--Tests/QtAutogen/AutogenTest.cmake53
-rw-r--r--Tests/QtAutogen/CMakeLists.txt233
-rw-r--r--Tests/QtAutogen/CommonTests.cmake40
-rw-r--r--Tests/QtAutogen/Complex/Adir/CMakeLists.txt (renamed from Tests/QtAutogen/complex/Adir/CMakeLists.txt)0
-rw-r--r--Tests/QtAutogen/Complex/Adir/libA.cpp (renamed from Tests/QtAutogen/complex/Adir/libA.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/Adir/libA.h (renamed from Tests/QtAutogen/complex/Adir/libA.h)0
-rw-r--r--Tests/QtAutogen/Complex/Bdir/CMakeLists.txt (renamed from Tests/QtAutogen/complex/Bdir/CMakeLists.txt)0
-rw-r--r--Tests/QtAutogen/Complex/Bdir/libB.cpp (renamed from Tests/QtAutogen/complex/Bdir/libB.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/Bdir/libB.h (renamed from Tests/QtAutogen/complex/Bdir/libB.h)0
-rw-r--r--Tests/QtAutogen/Complex/CMakeLists.txt (renamed from Tests/QtAutogen/complex/CMakeLists.txt)6
-rw-r--r--Tests/QtAutogen/Complex/abc.cpp (renamed from Tests/QtAutogen/complex/abc.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/abc.h (renamed from Tests/QtAutogen/complex/abc.h)0
-rw-r--r--Tests/QtAutogen/Complex/abc_p.h (renamed from Tests/QtAutogen/complex/abc_p.h)0
-rw-r--r--Tests/QtAutogen/Complex/bar.cpp (renamed from Tests/QtAutogen/complex/bar.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/blub.cpp (renamed from Tests/QtAutogen/complex/blub.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/blub.h (renamed from Tests/QtAutogen/complex/blub.h)0
-rw-r--r--Tests/QtAutogen/Complex/calwidget.cpp (renamed from Tests/QtAutogen/complex/calwidget.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/calwidget.h (renamed from Tests/QtAutogen/complex/calwidget.h)0
-rw-r--r--Tests/QtAutogen/Complex/calwidget.ui (renamed from Tests/QtAutogen/complex/calwidget.ui)0
-rw-r--r--Tests/QtAutogen/Complex/codeeditor.cpp (renamed from Tests/QtAutogen/complex/codeeditor.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/codeeditor.h (renamed from Tests/QtAutogen/complex/codeeditor.h)0
-rw-r--r--Tests/QtAutogen/Complex/debug_class.cpp (renamed from Tests/QtAutogen/complex/debug_class.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/debug_class.h (renamed from Tests/QtAutogen/complex/debug_class.h)0
-rw-r--r--Tests/QtAutogen/Complex/debug_class.ui (renamed from Tests/QtAutogen/complex/debug_class.ui)0
-rw-r--r--Tests/QtAutogen/Complex/debug_resource.qrc (renamed from Tests/QtAutogen/complex/debug_resource.qrc)0
-rw-r--r--Tests/QtAutogen/Complex/foo.cpp (renamed from Tests/QtAutogen/complex/foo.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/foo.h (renamed from Tests/QtAutogen/complex/foo.h)0
-rw-r--r--Tests/QtAutogen/Complex/gadget.cpp (renamed from Tests/QtAutogen/complex/gadget.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/gadget.h (renamed from Tests/QtAutogen/complex/gadget.h)0
-rw-r--r--Tests/QtAutogen/Complex/generated.cpp (renamed from Tests/QtAutogen/complex/generated.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/generated.h (renamed from Tests/QtAutogen/complex/generated.h)0
-rw-r--r--Tests/QtAutogen/Complex/generated.txt.in (renamed from Tests/QtAutogen/complex/generated.txt.in)0
-rw-r--r--Tests/QtAutogen/Complex/generated_resource.qrc.in (renamed from Tests/QtAutogen/complex/generated_resource.qrc.in)0
-rw-r--r--Tests/QtAutogen/Complex/libC.cpp (renamed from Tests/QtAutogen/complex/libC.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/libC.h (renamed from Tests/QtAutogen/complex/libC.h)0
-rw-r--r--Tests/QtAutogen/Complex/main.cpp (renamed from Tests/QtAutogen/complex/main.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/multiplewidgets.cpp (renamed from Tests/QtAutogen/complex/multiplewidgets.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/multiplewidgets.h (renamed from Tests/QtAutogen/complex/multiplewidgets.h)0
-rw-r--r--Tests/QtAutogen/Complex/myinterface.h.in (renamed from Tests/QtAutogen/complex/myinterface.h.in)0
-rw-r--r--Tests/QtAutogen/Complex/myotherinterface.h.in (renamed from Tests/QtAutogen/complex/myotherinterface.h.in)0
-rw-r--r--Tests/QtAutogen/Complex/private_slot.cpp (renamed from Tests/QtAutogen/complex/private_slot.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/private_slot.h (renamed from Tests/QtAutogen/complex/private_slot.h)0
-rw-r--r--Tests/QtAutogen/Complex/resourcetester.cpp (renamed from Tests/QtAutogen/complex/resourcetester.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/resourcetester.h (renamed from Tests/QtAutogen/complex/resourcetester.h)0
-rw-r--r--Tests/QtAutogen/Complex/second_resource.qrc (renamed from Tests/QtAutogen/complex/second_resource.qrc)0
-rw-r--r--Tests/QtAutogen/Complex/second_widget.cpp (renamed from Tests/QtAutogen/complex/second_widget.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/second_widget.h (renamed from Tests/QtAutogen/complex/second_widget.h)0
-rw-r--r--Tests/QtAutogen/Complex/second_widget.ui (renamed from Tests/QtAutogen/complex/second_widget.ui)0
-rw-r--r--Tests/QtAutogen/Complex/sub/bar.h (renamed from Tests/QtAutogen/complex/sub/bar.h)0
-rw-r--r--Tests/QtAutogen/Complex/targetObjectsTest.cpp (renamed from Tests/QtAutogen/complex/targetObjectsTest.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/test.qrc (renamed from Tests/QtAutogen/complex/test.qrc)0
-rw-r--r--Tests/QtAutogen/Complex/widget1.ui (renamed from Tests/QtAutogen/complex/widget1.ui)0
-rw-r--r--Tests/QtAutogen/Complex/widget2.ui (renamed from Tests/QtAutogen/complex/widget2.ui)0
-rw-r--r--Tests/QtAutogen/Complex/xyz.cpp (renamed from Tests/QtAutogen/complex/xyz.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/xyz.h (renamed from Tests/QtAutogen/complex/xyz.h)0
-rw-r--r--Tests/QtAutogen/Complex/yaf.cpp (renamed from Tests/QtAutogen/complex/yaf.cpp)0
-rw-r--r--Tests/QtAutogen/Complex/yaf.h (renamed from Tests/QtAutogen/complex/yaf.h)0
-rw-r--r--Tests/QtAutogen/Complex/yaf_p.h (renamed from Tests/QtAutogen/complex/yaf_p.h)0
-rw-r--r--Tests/QtAutogen/DefinesTest/CMakeLists.txt13
-rw-r--r--Tests/QtAutogen/DefinesTest/defines_test.cpp (renamed from Tests/QtAutogenRerun/defines_test/defines_test.cpp)0
-rw-r--r--Tests/QtAutogen/MacOsFW/CMakeLists.txt (renamed from Tests/QtAutogen/macosFW/CMakeLists.txt)5
-rw-r--r--Tests/QtAutogen/MacOsFW/src/CMakeLists.txt (renamed from Tests/QtAutogen/macosFW/src/CMakeLists.txt)0
-rw-r--r--Tests/QtAutogen/MacOsFW/src/macos_fw_lib.cpp (renamed from Tests/QtAutogen/macosFW/src/macos_fw_lib.cpp)0
-rw-r--r--Tests/QtAutogen/MacOsFW/src/macos_fw_lib.h (renamed from Tests/QtAutogen/macosFW/src/macos_fw_lib.h)0
-rw-r--r--Tests/QtAutogen/MacOsFW/test/CMakeLists.txt (renamed from Tests/QtAutogen/macosFW/test/CMakeLists.txt)0
-rw-r--r--Tests/QtAutogen/MacOsFW/test/testMacosFWLib.cpp (renamed from Tests/QtAutogen/macosFW/test/testMacosFWLib.cpp)0
-rw-r--r--Tests/QtAutogen/MacOsFW/test/testMacosFWLib.h (renamed from Tests/QtAutogen/macosFW/test/testMacosFWLib.h)0
-rw-r--r--Tests/QtAutogen/MocCMP0071/CMakeLists.txt6
-rw-r--r--Tests/QtAutogen/MocCMP0071/NEW/CMakeLists.txt (renamed from Tests/QtAutogen/mocCMP0071/NEW/CMakeLists.txt)2
-rw-r--r--Tests/QtAutogen/MocCMP0071/OLD/CMakeLists.txt (renamed from Tests/QtAutogen/mocCMP0071/OLD/CMakeLists.txt)2
-rw-r--r--Tests/QtAutogen/MocCMP0071/Obj.cpp (renamed from Tests/QtAutogen/mocCMP0071/Obj.cpp)0
-rw-r--r--Tests/QtAutogen/MocCMP0071/Obj.hpp (renamed from Tests/QtAutogen/mocCMP0071/Obj.hpp)0
-rw-r--r--Tests/QtAutogen/MocCMP0071/Obj_p.h (renamed from Tests/QtAutogen/mocCMP0071/Obj_p.h)0
-rw-r--r--Tests/QtAutogen/MocCMP0071/main.cpp (renamed from Tests/QtAutogen/mocCMP0071/main.cpp)0
-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
-rw-r--r--Tests/QtAutogen/MocInclude/EObjA.cpp (renamed from Tests/QtAutogen/mocInclude/EObjA.cpp)1
-rw-r--r--Tests/QtAutogen/MocInclude/EObjA.hpp (renamed from Tests/QtAutogen/mocInclude/EObjA.hpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/EObjAExtra.cpp (renamed from Tests/QtAutogen/mocInclude/EObjAExtra.cpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/EObjAExtra.hpp (renamed from Tests/QtAutogen/mocInclude/EObjAExtra.hpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/EObjAExtra_p.hpp (renamed from Tests/QtAutogen/mocInclude/EObjAExtra_p.hpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/EObjA_p.hpp (renamed from Tests/QtAutogen/mocInclude/EObjA_p.hpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/EObjB.cpp (renamed from Tests/QtAutogen/mocInclude/EObjB.cpp)1
-rw-r--r--Tests/QtAutogen/MocInclude/EObjB.hpp (renamed from Tests/QtAutogen/mocInclude/EObjB.hpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/EObjB_p.hpp (renamed from Tests/QtAutogen/mocInclude/EObjB_p.hpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/LObjA.cpp (renamed from Tests/QtAutogen/mocInclude/LObjA.cpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/LObjA.hpp (renamed from Tests/QtAutogen/mocInclude/LObjA.hpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/LObjA_p.h (renamed from Tests/QtAutogen/mocInclude/LObjA_p.h)0
-rw-r--r--Tests/QtAutogen/MocInclude/LObjB.cpp (renamed from Tests/QtAutogen/mocInclude/LObjB.cpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/LObjB.hpp (renamed from Tests/QtAutogen/mocInclude/LObjB.hpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/LObjB_p.h (renamed from Tests/QtAutogen/mocInclude/LObjB_p.h)0
-rw-r--r--Tests/QtAutogen/MocInclude/ObjA.cpp (renamed from Tests/QtAutogen/mocInclude/ObjA.cpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/ObjA.hpp (renamed from Tests/QtAutogen/mocInclude/ObjA.hpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/ObjA_p.h (renamed from Tests/QtAutogen/mocInclude/ObjA_p.h)0
-rw-r--r--Tests/QtAutogen/MocInclude/ObjB.cpp (renamed from Tests/QtAutogen/mocInclude/ObjB.cpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/ObjB.hpp (renamed from Tests/QtAutogen/mocInclude/ObjB.hpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/ObjB_p.h (renamed from Tests/QtAutogen/mocInclude/ObjB_p.h)0
-rw-r--r--Tests/QtAutogen/MocInclude/SObjA.cpp (renamed from Tests/QtAutogen/mocInclude/SObjA.cpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/SObjA.hpp (renamed from Tests/QtAutogen/mocInclude/SObjA.hpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/SObjB.cpp.in (renamed from Tests/QtAutogen/mocInclude/SObjB.cpp.in)0
-rw-r--r--Tests/QtAutogen/MocInclude/SObjB.hpp.in (renamed from Tests/QtAutogen/mocInclude/SObjB.hpp.in)0
-rw-r--r--Tests/QtAutogen/MocInclude/SObjC.cpp (renamed from Tests/QtAutogen/mocInclude/SObjC.cpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/SObjC.hpp (renamed from Tests/QtAutogen/mocInclude/SObjC.hpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/SObjCExtra.cpp (renamed from Tests/QtAutogen/mocInclude/SObjCExtra.cpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/SObjCExtra.hpp (renamed from Tests/QtAutogen/mocInclude/SObjCExtra.hpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/SObjCExtra.moc.in (renamed from Tests/QtAutogen/mocInclude/SObjCExtra.moc.in)0
-rw-r--r--Tests/QtAutogen/MocInclude/shared.cmake (renamed from Tests/QtAutogen/mocInclude/shared.cmake)42
-rw-r--r--Tests/QtAutogen/MocInclude/subExtra/EObjBExtra.cpp (renamed from Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.cpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/subExtra/EObjBExtra.hpp (renamed from Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.hpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/subExtra/EObjBExtra_p.hpp (renamed from Tests/QtAutogen/mocInclude/subExtra/EObjBExtra_p.hpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/subGlobal/GObj.cpp (renamed from Tests/QtAutogen/mocInclude/subGlobal/GObj.cpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/subGlobal/GObj.hpp (renamed from Tests/QtAutogen/mocInclude/subGlobal/GObj.hpp)0
-rw-r--r--Tests/QtAutogen/MocInclude/subGlobal/GObj_p.hpp (renamed from Tests/QtAutogen/mocInclude/subGlobal/GObj_p.hpp)0
-rw-r--r--Tests/QtAutogen/MocIncludeRelaxed/CMakeLists.txt (renamed from Tests/QtAutogen/mocIncludeRelaxed/CMakeLists.txt)7
-rw-r--r--Tests/QtAutogen/MocIncludeRelaxed/RMain.cpp (renamed from Tests/QtAutogen/mocIncludeRelaxed/RMain.cpp)0
-rw-r--r--Tests/QtAutogen/MocIncludeRelaxed/RObjA.cpp (renamed from Tests/QtAutogen/mocIncludeRelaxed/RObjA.cpp)0
-rw-r--r--Tests/QtAutogen/MocIncludeRelaxed/RObjA.hpp (renamed from Tests/QtAutogen/mocIncludeRelaxed/RObjA.hpp)0
-rw-r--r--Tests/QtAutogen/MocIncludeRelaxed/RObjB.cpp (renamed from Tests/QtAutogen/mocIncludeRelaxed/RObjB.cpp)0
-rw-r--r--Tests/QtAutogen/MocIncludeRelaxed/RObjB.hpp (renamed from Tests/QtAutogen/mocIncludeRelaxed/RObjB.hpp)0
-rw-r--r--Tests/QtAutogen/MocIncludeRelaxed/RObjBExtra.hpp (renamed from Tests/QtAutogen/mocIncludeRelaxed/RObjBExtra.hpp)0
-rw-r--r--Tests/QtAutogen/MocIncludeRelaxed/RObjC.cpp (renamed from Tests/QtAutogen/mocIncludeRelaxed/RObjC.cpp)0
-rw-r--r--Tests/QtAutogen/MocIncludeRelaxed/RObjC.hpp (renamed from Tests/QtAutogen/mocIncludeRelaxed/RObjC.hpp)0
-rw-r--r--Tests/QtAutogen/MocIncludeRelaxed/main.cpp (renamed from Tests/QtAutogen/mocIncludeStrict/main.cpp)0
-rw-r--r--Tests/QtAutogen/MocIncludeStrict/CMakeLists.txt10
-rw-r--r--Tests/QtAutogen/MocIncludeStrict/main.cpp (renamed from Tests/QtAutogen/mocIncludeRelaxed/main.cpp)0
-rw-r--r--Tests/QtAutogen/MocMacroName/CMakeLists.txt17
-rw-r--r--Tests/QtAutogen/MocMacroName/CustomMacros.hpp (renamed from Tests/QtAutogen/mocMacroName/CustomMacros.hpp)0
-rw-r--r--Tests/QtAutogen/MocMacroName/Gadget.cpp (renamed from Tests/QtAutogen/mocMacroName/Gadget.cpp)2
-rw-r--r--Tests/QtAutogen/MocMacroName/Gadget.hpp (renamed from Tests/QtAutogen/mocMacroName/Gadget.hpp)8
-rw-r--r--Tests/QtAutogen/MocMacroName/Object.cpp (renamed from Tests/QtAutogen/mocMacroName/Object.cpp)1
-rw-r--r--Tests/QtAutogen/MocMacroName/Object.hpp (renamed from Tests/QtAutogen/mocMacroName/Object.hpp)7
-rw-r--r--Tests/QtAutogen/MocMacroName/Object1Aliased.cpp (renamed from Tests/QtAutogen/mocMacroName/Object1Aliased.cpp)0
-rw-r--r--Tests/QtAutogen/MocMacroName/Object1Aliased.hpp (renamed from Tests/QtAutogen/mocMacroName/Object1Aliased.hpp)0
-rw-r--r--Tests/QtAutogen/MocMacroName/Object2Aliased.cpp (renamed from Tests/QtAutogen/mocMacroName/Object2Aliased.cpp)0
-rw-r--r--Tests/QtAutogen/MocMacroName/Object2Aliased.hpp (renamed from Tests/QtAutogen/mocMacroName/Object2Aliased.hpp)0
-rw-r--r--Tests/QtAutogen/MocMacroName/main.cpp (renamed from Tests/QtAutogen/mocMacroName/main.cpp)0
-rw-r--r--Tests/QtAutogen/MocOnly/CMakeLists.txt8
-rw-r--r--Tests/QtAutogen/MocOnly/StyleA.cpp (renamed from Tests/QtAutogen/mocOnlySource/StyleA.cpp)0
-rw-r--r--Tests/QtAutogen/MocOnly/StyleA.hpp (renamed from Tests/QtAutogen/mocOnlySource/StyleA.hpp)2
-rw-r--r--Tests/QtAutogen/MocOnly/StyleB.cpp (renamed from Tests/QtAutogen/mocOnlySource/StyleB.cpp)0
-rw-r--r--Tests/QtAutogen/MocOnly/StyleB.hpp (renamed from Tests/QtAutogen/mocOnlySource/StyleB.hpp)2
-rw-r--r--Tests/QtAutogen/MocOnly/main.cpp (renamed from Tests/QtAutogen/mocOnlySource/main.cpp)0
-rw-r--r--Tests/QtAutogen/MocOptions/CMakeLists.txt9
-rw-r--r--Tests/QtAutogen/MocOptions/Object.cpp5
-rw-r--r--Tests/QtAutogen/MocOptions/Object.hpp13
-rw-r--r--Tests/QtAutogen/MocOptions/main.cpp7
-rw-r--r--Tests/QtAutogen/MocSkipSource/CMakeLists.txt36
-rw-r--r--Tests/QtAutogen/MocSkipSource/qItemA.cpp (renamed from Tests/QtAutogen/skipSource/qItemA.cpp)0
-rw-r--r--Tests/QtAutogen/MocSkipSource/qItemA.hpp (renamed from Tests/QtAutogen/skipSource/qItemA.hpp)0
-rw-r--r--Tests/QtAutogen/MocSkipSource/qItemB.cpp (renamed from Tests/QtAutogen/skipSource/qItemB.cpp)0
-rw-r--r--Tests/QtAutogen/MocSkipSource/qItemB.hpp (renamed from Tests/QtAutogen/skipSource/qItemB.hpp)0
-rw-r--r--Tests/QtAutogen/MocSkipSource/qItemC.cpp (renamed from Tests/QtAutogen/skipSource/qItemC.cpp)0
-rw-r--r--Tests/QtAutogen/MocSkipSource/qItemC.hpp (renamed from Tests/QtAutogen/skipSource/qItemC.hpp)0
-rw-r--r--Tests/QtAutogen/MocSkipSource/qItemD.cpp (renamed from Tests/QtAutogen/skipSource/qItemD.cpp)0
-rw-r--r--Tests/QtAutogen/MocSkipSource/qItemD.hpp (renamed from Tests/QtAutogen/skipSource/qItemD.hpp)0
-rw-r--r--Tests/QtAutogen/MocSkipSource/skipMoc.cpp (renamed from Tests/QtAutogen/skipMoc.cpp)8
-rw-r--r--Tests/QtAutogen/ObjectLibrary/CMakeLists.txt (renamed from Tests/QtAutogen/objectLibrary/CMakeLists.txt)4
-rw-r--r--Tests/QtAutogen/ObjectLibrary/a/CMakeLists.txt (renamed from Tests/QtAutogen/objectLibrary/a/CMakeLists.txt)0
-rw-r--r--Tests/QtAutogen/ObjectLibrary/a/classa.cpp (renamed from Tests/QtAutogen/objectLibrary/a/classa.cpp)0
-rw-r--r--Tests/QtAutogen/ObjectLibrary/a/classa.h (renamed from Tests/QtAutogen/objectLibrary/a/classa.h)0
-rw-r--r--Tests/QtAutogen/ObjectLibrary/b/classb.cpp (renamed from Tests/QtAutogen/objectLibrary/b/classb.cpp)0
-rw-r--r--Tests/QtAutogen/ObjectLibrary/b/classb.h (renamed from Tests/QtAutogen/objectLibrary/b/classb.h)0
-rw-r--r--Tests/QtAutogen/ObjectLibrary/main.cpp (renamed from Tests/QtAutogen/objectLibrary/main.cpp)0
-rw-r--r--Tests/QtAutogen/RccEmpty/CMakeLists.txt8
-rw-r--r--Tests/QtAutogen/RccEmpty/rccEmpty.cpp (renamed from Tests/QtAutogen/rccEmpty.cpp)0
-rw-r--r--Tests/QtAutogen/RccEmpty/rccEmptyRes.qrc (renamed from Tests/QtAutogen/rccEmptyRes.qrc)0
-rw-r--r--Tests/QtAutogen/RccOffMocLibrary/CMakeLists.txt17
-rw-r--r--Tests/QtAutogen/RccOffMocLibrary/empty.cpp (renamed from Tests/QtAutogen/empty.cpp)0
-rw-r--r--Tests/QtAutogen/RccOffMocLibrary/empty.h (renamed from Tests/QtAutogen/empty.h)0
-rw-r--r--Tests/QtAutogen/RccOffMocLibrary/not_generated_file.qrc (renamed from Tests/QtAutogen/not_generated_file.qrc)0
-rw-r--r--Tests/QtAutogen/RccOnly/CMakeLists.txt8
-rw-r--r--Tests/QtAutogen/RccOnly/rccOnly.cpp (renamed from Tests/QtAutogen/rccOnly.cpp)0
-rw-r--r--Tests/QtAutogen/RccOnly/rccOnlyRes.qrc (renamed from Tests/QtAutogen/rccOnlyRes.qrc)0
-rw-r--r--Tests/QtAutogen/RccSkipSource/CMakeLists.txt23
-rw-r--r--Tests/QtAutogen/RccSkipSource/skipRcc.cpp (renamed from Tests/QtAutogen/skipRcc.cpp)0
-rw-r--r--Tests/QtAutogen/RccSkipSource/skipRccBad1.qrc (renamed from Tests/QtAutogen/skipSource/skipRccBad1.qrc)0
-rw-r--r--Tests/QtAutogen/RccSkipSource/skipRccBad2.qrc (renamed from Tests/QtAutogen/skipSource/skipRccBad2.qrc)0
-rw-r--r--Tests/QtAutogen/RccSkipSource/skipRccGood.qrc (renamed from Tests/QtAutogen/skipSource/skipRccGood.qrc)0
-rw-r--r--Tests/QtAutogen/RerunMocBasic/CMakeLists.txt65
-rw-r--r--Tests/QtAutogen/RerunMocBasic/MocBasic/CMakeLists.txt24
-rw-r--r--Tests/QtAutogen/RerunMocBasic/MocBasic/input.txt (renamed from Tests/QtAutogenRerun/mocRerun/input.txt)0
-rw-r--r--Tests/QtAutogen/RerunMocBasic/MocBasic/main.cpp.in (renamed from Tests/QtAutogenRerun/mocRerun/main.cpp.in)5
-rw-r--r--Tests/QtAutogen/RerunMocBasic/MocBasic/res1.qrc (renamed from Tests/QtAutogenRerun/mocRerun/res1.qrc)0
-rw-r--r--Tests/QtAutogen/RerunMocBasic/MocBasic/test1a.h.in (renamed from Tests/QtAutogenRerun/mocRerun/test1a.h.in)0
-rw-r--r--Tests/QtAutogen/RerunMocBasic/MocBasic/test1b.h.in (renamed from Tests/QtAutogenRerun/mocRerun/test1b.h.in)0
-rw-r--r--Tests/QtAutogen/RerunMocBasic/dummy.cpp (renamed from Tests/QtAutogenRerun/dummy.cpp)0
-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.cpp5
-rw-r--r--Tests/QtAutogen/RerunRccDepends/CMakeLists.txt (renamed from Tests/QtAutogenRerun/rccDepends.cmake)20
-rw-r--r--Tests/QtAutogen/RerunRccDepends/RccDepends/CMakeLists.txt (renamed from Tests/QtAutogenRerun/rccDepends/CMakeLists.txt)32
-rw-r--r--Tests/QtAutogen/RerunRccDepends/RccDepends/main.cpp (renamed from Tests/QtAutogenRerun/rccDepends/main.cpp)0
-rw-r--r--Tests/QtAutogen/RerunRccDepends/RccDepends/resGen/input.txt.in (renamed from Tests/QtAutogenRerun/rccDepends/resGen/input.txt.in)0
-rw-r--r--Tests/QtAutogen/RerunRccDepends/RccDepends/resGen/inputAdded.txt.in (renamed from Tests/QtAutogenRerun/rccDepends/resGen/inputAdded.txt.in)0
-rw-r--r--Tests/QtAutogen/RerunRccDepends/RccDepends/resGenA.qrc.in (renamed from Tests/QtAutogenRerun/rccDepends/resGenA.qrc.in)0
-rw-r--r--Tests/QtAutogen/RerunRccDepends/RccDepends/resGenB.qrc.in (renamed from Tests/QtAutogenRerun/rccDepends/resGenB.qrc.in)0
-rw-r--r--Tests/QtAutogen/RerunRccDepends/RccDepends/resPlain/input.txt.in (renamed from Tests/QtAutogenRerun/rccDepends/resPlain/input.txt.in)0
-rw-r--r--Tests/QtAutogen/RerunRccDepends/RccDepends/resPlain/inputAdded.txt.in (renamed from Tests/QtAutogenRerun/rccDepends/resPlain/inputAdded.txt.in)0
-rw-r--r--Tests/QtAutogen/RerunRccDepends/RccDepends/resPlainA.qrc.in (renamed from Tests/QtAutogenRerun/rccDepends/resPlainA.qrc.in)0
-rw-r--r--Tests/QtAutogen/RerunRccDepends/RccDepends/resPlainB.qrc.in (renamed from Tests/QtAutogenRerun/rccDepends/resPlainB.qrc.in)0
-rw-r--r--Tests/QtAutogen/RerunRccDepends/dummy.cpp5
-rw-r--r--Tests/QtAutogen/SameName/CMakeLists.txt (renamed from Tests/QtAutogen/sameName/CMakeLists.txt)7
-rw-r--r--Tests/QtAutogen/SameName/aaa/bbb/data.qrc (renamed from Tests/QtAutogen/sameName/aaa/bbb/data.qrc)0
-rw-r--r--Tests/QtAutogen/SameName/aaa/bbb/item.cpp (renamed from Tests/QtAutogen/sameName/aaa/bbb/item.cpp)0
-rw-r--r--Tests/QtAutogen/SameName/aaa/bbb/item.hpp (renamed from Tests/QtAutogen/sameName/aaa/bbb/item.hpp)0
-rw-r--r--Tests/QtAutogen/SameName/aaa/data.qrc (renamed from Tests/QtAutogen/sameName/aaa/data.qrc)0
-rw-r--r--Tests/QtAutogen/SameName/aaa/item.cpp (renamed from Tests/QtAutogen/sameName/aaa/item.cpp)0
-rw-r--r--Tests/QtAutogen/SameName/aaa/item.hpp (renamed from Tests/QtAutogen/sameName/aaa/item.hpp)0
-rw-r--r--Tests/QtAutogen/SameName/aaa/view.ui (renamed from Tests/QtAutogen/sameName/aaa/view.ui)0
-rw-r--r--Tests/QtAutogen/SameName/bbb/aaa/data.qrc (renamed from Tests/QtAutogen/sameName/bbb/aaa/data.qrc)0
-rw-r--r--Tests/QtAutogen/SameName/bbb/aaa/item.cpp (renamed from Tests/QtAutogen/sameName/bbb/aaa/item.cpp)0
-rw-r--r--Tests/QtAutogen/SameName/bbb/aaa/item.hpp (renamed from Tests/QtAutogen/sameName/bbb/aaa/item.hpp)0
-rw-r--r--Tests/QtAutogen/SameName/bbb/data.qrc (renamed from Tests/QtAutogen/sameName/bbb/data.qrc)0
-rw-r--r--Tests/QtAutogen/SameName/bbb/item.cpp (renamed from Tests/QtAutogen/sameName/bbb/item.cpp)0
-rw-r--r--Tests/QtAutogen/SameName/bbb/item.hpp (renamed from Tests/QtAutogen/sameName/bbb/item.hpp)0
-rw-r--r--Tests/QtAutogen/SameName/bbb/view.ui (renamed from Tests/QtAutogen/sameName/bbb/view.ui)0
-rw-r--r--Tests/QtAutogen/SameName/ccc/data.qrc (renamed from Tests/QtAutogen/sameName/ccc/data.qrc)0
-rw-r--r--Tests/QtAutogen/SameName/ccc/item.cpp (renamed from Tests/QtAutogen/sameName/ccc/item.cpp)0
-rw-r--r--Tests/QtAutogen/SameName/ccc/item.hpp (renamed from Tests/QtAutogen/sameName/ccc/item.hpp)0
-rw-r--r--Tests/QtAutogen/SameName/ccc/view.ui (renamed from Tests/QtAutogen/sameName/ccc/view.ui)0
-rw-r--r--Tests/QtAutogen/SameName/data.qrc (renamed from Tests/QtAutogen/sameName/data.qrc)0
-rw-r--r--Tests/QtAutogen/SameName/item.cpp (renamed from Tests/QtAutogen/sameName/item.cpp)0
-rw-r--r--Tests/QtAutogen/SameName/item.hpp (renamed from Tests/QtAutogen/sameName/item.hpp)0
-rw-r--r--Tests/QtAutogen/SameName/main.cpp (renamed from Tests/QtAutogen/sameName/main.cpp)0
-rw-r--r--Tests/QtAutogen/SameName/view.ui (renamed from Tests/QtAutogen/sameName/view.ui)0
-rw-r--r--Tests/QtAutogen/StaticLibraryCycle/CMakeLists.txt (renamed from Tests/QtAutogen/staticLibraryCycle/CMakeLists.txt)7
-rw-r--r--Tests/QtAutogen/StaticLibraryCycle/a.cpp12
-rw-r--r--Tests/QtAutogen/StaticLibraryCycle/a.h (renamed from Tests/QtAutogen/staticLibraryCycle/a.h)2
-rw-r--r--Tests/QtAutogen/StaticLibraryCycle/b.cpp (renamed from Tests/QtAutogen/staticLibraryCycle/b.cpp)0
-rw-r--r--Tests/QtAutogen/StaticLibraryCycle/b.h (renamed from Tests/QtAutogen/staticLibraryCycle/b.h)0
-rw-r--r--Tests/QtAutogen/StaticLibraryCycle/c.cpp (renamed from Tests/QtAutogen/staticLibraryCycle/c.cpp)0
-rw-r--r--Tests/QtAutogen/StaticLibraryCycle/c.h (renamed from Tests/QtAutogen/staticLibraryCycle/c.h)0
-rw-r--r--Tests/QtAutogen/StaticLibraryCycle/main.cpp (renamed from Tests/QtAutogen/staticLibraryCycle/main.cpp)0
-rw-r--r--Tests/QtAutogen/TestMacros.cmake60
-rw-r--r--Tests/QtAutogen/UicInclude/CMakeLists.txt (renamed from Tests/QtAutogen/uicInclude/CMakeLists.txt)5
-rw-r--r--Tests/QtAutogen/UicInclude/PageC.ui (renamed from Tests/QtAutogen/uicInclude/PageC.ui)0
-rw-r--r--Tests/QtAutogen/UicInclude/PageC2.ui (renamed from Tests/QtAutogen/uicInclude/PageC2.ui)0
-rw-r--r--Tests/QtAutogen/UicInclude/dirA/PageA.ui (renamed from Tests/QtAutogen/uicInclude/dirA/PageA.ui)0
-rw-r--r--Tests/QtAutogen/UicInclude/dirB/PageB.ui (renamed from Tests/QtAutogen/uicInclude/dirB/PageB.ui)0
-rw-r--r--Tests/QtAutogen/UicInclude/dirB/PageB2.ui (renamed from Tests/QtAutogen/uicInclude/dirB/PageB2.ui)0
-rw-r--r--Tests/QtAutogen/UicInclude/dirB/subB/PageBsub.ui (renamed from Tests/QtAutogen/uicInclude/dirB/subB/PageBsub.ui)0
-rw-r--r--Tests/QtAutogen/UicInclude/main.cpp (renamed from Tests/QtAutogen/uicInclude/main.cpp)0
-rw-r--r--Tests/QtAutogen/UicInclude/main.hpp (renamed from Tests/QtAutogen/uicInclude/main.hpp)0
-rw-r--r--Tests/QtAutogen/UicInclude/subC/PageCsub.ui (renamed from Tests/QtAutogen/uicInclude/subC/PageCsub.ui)0
-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
-rw-r--r--Tests/QtAutogen/UicOnly/CMakeLists.txt10
-rw-r--r--Tests/QtAutogen/UicOnly/uiconly.cpp (renamed from Tests/QtAutogen/uicOnlySource/uiconly.cpp)0
-rw-r--r--Tests/QtAutogen/UicOnly/uiconly.h (renamed from Tests/QtAutogen/uicOnlySource/uiconly.h)0
-rw-r--r--Tests/QtAutogen/UicOnly/uiconly.ui (renamed from Tests/QtAutogen/uicOnlySource/uiconly.ui)0
-rw-r--r--Tests/QtAutogen/UicSkipSource/CMakeLists.txt22
-rw-r--r--Tests/QtAutogen/UicSkipSource/skipUic.cpp (renamed from Tests/QtAutogen/skipUic.cpp)6
-rw-r--r--Tests/QtAutogen/UicSkipSource/skipUicGen.cpp (renamed from Tests/QtAutogen/skipSource/skipUicGen.cpp)0
-rw-r--r--Tests/QtAutogen/UicSkipSource/skipUicGen.hpp (renamed from Tests/QtAutogen/skipSource/skipUicGen.hpp)0
-rw-r--r--Tests/QtAutogen/UicSkipSource/skipUicNoGen1.cpp (renamed from Tests/QtAutogen/skipSource/skipUicNoGen1.cpp)0
-rw-r--r--Tests/QtAutogen/UicSkipSource/skipUicNoGen1.hpp (renamed from Tests/QtAutogen/skipSource/skipUicNoGen1.hpp)0
-rw-r--r--Tests/QtAutogen/UicSkipSource/skipUicNoGen2.cpp (renamed from Tests/QtAutogen/skipSource/skipUicNoGen2.cpp)0
-rw-r--r--Tests/QtAutogen/UicSkipSource/skipUicNoGen2.hpp (renamed from Tests/QtAutogen/skipSource/skipUicNoGen2.hpp)0
-rw-r--r--Tests/QtAutogen/UicSkipSource/ui_nogen1.h (renamed from Tests/QtAutogen/skipSource/ui_nogen1.h)0
-rw-r--r--Tests/QtAutogen/UicSkipSource/ui_nogen2.h (renamed from Tests/QtAutogen/skipSource/ui_nogen2.h)2
-rw-r--r--Tests/QtAutogen/UicSkipSource/uigen1.ui (renamed from Tests/QtAutogen/skipSource/uigen1.ui)0
-rw-r--r--Tests/QtAutogen/UicSkipSource/uigen2.ui (renamed from Tests/QtAutogen/skipSource/uigen2.ui)0
-rw-r--r--Tests/QtAutogen/defines_test/CMakeLists.txt4
-rw-r--r--Tests/QtAutogen/defines_test/defines_test.cpp38
-rw-r--r--Tests/QtAutogen/mocCMP0071/CMakeLists.txt4
-rw-r--r--Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt6
-rw-r--r--Tests/QtAutogen/mocMacroName/CMakeLists.txt8
-rw-r--r--Tests/QtAutogen/staticLibraryCycle/a.cpp7
-rw-r--r--Tests/QtAutogenRerun/CMakeLists.txt52
-rw-r--r--Tests/QtAutogenRerun/defines_test/CMakeLists.txt4
-rw-r--r--Tests/QtAutogenRerun/mocRerun.cmake60
-rw-r--r--Tests/QtAutogenRerun/mocRerun/CMakeLists.txt33
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-result.txt1
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-stderr-VS.txt7
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-stderr-Xcode.txt7
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions.cmake5
-rw-r--r--Tests/RunCMake/COMPILE_LANGUAGE-genex/RunCMakeTest.cmake7
322 files changed, 711 insertions, 701 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 1d13f1c..5d8c2fe 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1242,20 +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_autogen_test ${CMAKE_CTEST_COMMAND} -V)
- set(run_autouic_test ${CMAKE_CTEST_COMMAND} -V)
- else()
- set(run_autogen_test complex/QtAutogen)
- 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()
@@ -1263,97 +1249,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
find_package(Qt5Widgets QUIET NO_MODULE)
endif()
if(CMake_TEST_Qt5 AND Qt5Widgets_FOUND)
- add_test(NAME Qt5Autogen COMMAND ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/QtAutogen"
- "${CMake_BINARY_DIR}/Tests/Qt5Autogen"
- ${build_generator_args}
- --build-project QtAutogen
- --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt5Autogen"
- --force-new-ctest-process
- --build-options ${build_options}
- -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
- -DQT_TEST_VERSION=5
- ${QtAutogen_BUILD_OPTIONS}
- --test-command ${run_autogen_test}
- )
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt5Autogen")
-
- add_test(NAME Qt5AutogenRerun COMMAND ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/QtAutogenRerun"
- "${CMake_BINARY_DIR}/Tests/Qt5AutogenRerun"
- ${build_generator_args}
- --build-project QtAutogenRerun
- --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt5AutogenRerun"
- --force-new-ctest-process
- --build-options ${build_options}
- -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
- -DQT_TEST_VERSION=5
- ${QtAutogen_BUILD_OPTIONS}
- )
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt5AutogenRerun")
-
- 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")
+ add_subdirectory(Qt5Autogen)
endif()
if(QT4_WORKS AND QT_QTGUI_FOUND)
- add_test(NAME Qt4Autogen COMMAND ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/QtAutogen"
- "${CMake_BINARY_DIR}/Tests/Qt4Autogen"
- ${build_generator_args}
- --build-project QtAutogen
- --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4Autogen"
- --force-new-ctest-process
- --build-options ${build_options}
- -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
- -DQT_TEST_VERSION=4
- ${QtAutogen_BUILD_OPTIONS}
- --test-command ${run_autogen_test}
- )
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4Autogen")
-
- add_test(NAME Qt4AutogenRerun COMMAND ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/QtAutogenRerun"
- "${CMake_BINARY_DIR}/Tests/Qt4AutogenRerun"
- ${build_generator_args}
- --build-project QtAutogenRerun
- --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4AutogenRerun"
- --force-new-ctest-process
- --build-options ${build_options}
- -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
- -DQT_TEST_VERSION=4
- ${QtAutogen_BUILD_OPTIONS}
- )
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4AutogenRerun")
-
- 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_subdirectory(Qt4Autogen)
add_test(Qt4Targets ${CMAKE_CTEST_COMMAND}
--build-and-test
diff --git a/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt b/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt
index 8d6551b..83473ae 100644
--- a/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt
+++ b/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt
@@ -16,11 +16,11 @@ else()
endif()
#Goal for this example:
-#Build a static library that defines multiple methods and kernels that
-#use each other.
-#Use a custom command to build an executable that uses this static library
-#We do these together to verify that we can get a static library to do
-#device symbol linking, and not have it done when the executable is made
+# Build a static library that defines multiple methods and kernels that
+# use each other.
+# Resolve the device symbols into that static library
+# Verify that we can't use those device symbols from anything that links
+# to the static library
string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CUDA_STANDARD 11)
@@ -43,6 +43,10 @@ add_custom_command(TARGET CUDAResolveDeviceLib POST_BUILD
endif()
add_executable(CudaOnlyResolveDeviceSymbols main.cu)
+set_target_properties(CudaOnlyResolveDeviceSymbols
+ PROPERTIES
+ CUDA_SEPARABLE_COMPILATION ON)
+
target_link_libraries(CudaOnlyResolveDeviceSymbols PRIVATE CUDAResolveDeviceLib)
if(APPLE)
diff --git a/Tests/CudaOnly/ResolveDeviceSymbols/main.cu b/Tests/CudaOnly/ResolveDeviceSymbols/main.cu
index b4b5b9e..d464f96 100644
--- a/Tests/CudaOnly/ResolveDeviceSymbols/main.cu
+++ b/Tests/CudaOnly/ResolveDeviceSymbols/main.cu
@@ -62,17 +62,8 @@ int main(int argc, char** argv)
return 0;
}
- cudaError_t err;
- file2_launch_kernel(42);
- err = cudaGetLastError();
- if (err != cudaSuccess) {
- std::cerr << "file2_launch_kernel: kernel launch failed: "
- << cudaGetErrorString(err) << std::endl;
- return 1;
- }
-
main_launch_kernel(1);
- err = cudaGetLastError();
+ cudaError_t err = cudaGetLastError();
if (err == cudaSuccess) {
// This kernel launch should fail as the file2_func was device linked
// into the static library and is not usable by the executable
diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt
index 5165970..0585d0c 100644
--- a/Tests/GeneratorExpression/CMakeLists.txt
+++ b/Tests/GeneratorExpression/CMakeLists.txt
@@ -263,9 +263,17 @@ add_custom_target(check-part4 ALL
add_executable(srcgenex_flags srcgenex_flags.c)
set_property(SOURCE srcgenex_flags.c PROPERTY COMPILE_FLAGS "-DNAME=$<TARGET_PROPERTY:NAME>")
+add_executable(srcgenex_flags_COMPILE_LANGUAGE srcgenex_flags_COMPILE_LANGUAGE.c)
+set_property(SOURCE srcgenex_flags_COMPILE_LANGUAGE.c PROPERTY COMPILE_FLAGS "$<$<COMPILE_LANGUAGE:C>:-DNAME=$<TARGET_PROPERTY:NAME>>")
+
add_executable(srcgenex_defs srcgenex_defs.c)
set_property(SOURCE srcgenex_defs.c PROPERTY COMPILE_DEFINITIONS NAME=$<TARGET_PROPERTY:NAME>)
+if (CMAKE_GENERATOR MATCHES "Makefiles|Ninja|Watcom WMake")
+ add_executable(srcgenex_defs_COMPILE_LANGUAGE srcgenex_defs_COMPILE_LANGUAGE.c)
+ set_property(SOURCE srcgenex_defs_COMPILE_LANGUAGE.c PROPERTY COMPILE_DEFINITIONS $<$<COMPILE_LANGUAGE:C>:NAME=$<TARGET_PROPERTY:NAME>>)
+endif()
+
#-----------------------------------------------------------------------------
# Cover test properties with generator expressions.
add_executable(echo echo.c)
diff --git a/Tests/GeneratorExpression/srcgenex_defs_COMPILE_LANGUAGE.c b/Tests/GeneratorExpression/srcgenex_defs_COMPILE_LANGUAGE.c
new file mode 100644
index 0000000..421b55b
--- /dev/null
+++ b/Tests/GeneratorExpression/srcgenex_defs_COMPILE_LANGUAGE.c
@@ -0,0 +1,12 @@
+int srcgenex_defs_COMPILE_LANGUAGE(void)
+{
+ return 0;
+}
+
+int main(int argc, char* argv[])
+{
+#ifndef NAME
+#error NAME not defined
+#endif
+ return NAME();
+}
diff --git a/Tests/GeneratorExpression/srcgenex_flags_COMPILE_LANGUAGE.c b/Tests/GeneratorExpression/srcgenex_flags_COMPILE_LANGUAGE.c
new file mode 100644
index 0000000..4e80d6e
--- /dev/null
+++ b/Tests/GeneratorExpression/srcgenex_flags_COMPILE_LANGUAGE.c
@@ -0,0 +1,12 @@
+int srcgenex_flags_COMPILE_LANGUAGE(void)
+{
+ return 0;
+}
+
+int main(int argc, char* argv[])
+{
+#ifndef NAME
+#error NAME not defined
+#endif
+ return NAME();
+}
diff --git a/Tests/Qt4Autogen/CMakeLists.txt b/Tests/Qt4Autogen/CMakeLists.txt
new file mode 100644
index 0000000..818e888
--- /dev/null
+++ b/Tests/Qt4Autogen/CMakeLists.txt
@@ -0,0 +1,9 @@
+# Set Qt test version and include the Autogen test macros
+set(QT_TEST_VERSION 4)
+include("../QtAutogen/TestMacros.cmake")
+
+# Qt4 only tests
+ADD_AUTOGEN_TEST(DefinesTest)
+
+# Common tests
+include("../QtAutogen/CommonTests.cmake")
diff --git a/Tests/Qt5Autogen/CMakeLists.txt b/Tests/Qt5Autogen/CMakeLists.txt
new file mode 100644
index 0000000..527e5ff
--- /dev/null
+++ b/Tests/Qt5Autogen/CMakeLists.txt
@@ -0,0 +1,6 @@
+# Set Qt test version and include the Autogen test macros
+set(QT_TEST_VERSION 5)
+include("../QtAutogen/TestMacros.cmake")
+
+# Common tests
+include("../QtAutogen/CommonTests.cmake")
diff --git a/Tests/QtAutogen/AutogenTest.cmake b/Tests/QtAutogen/AutogenTest.cmake
new file mode 100644
index 0000000..8c0a14f
--- /dev/null
+++ b/Tests/QtAutogen/AutogenTest.cmake
@@ -0,0 +1,53 @@
+
+# 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)
+ list(APPEND CMAKE_PREFIX_PATH ${Qt_PREFIX_DIR})
+endif()
+
+if (QT_TEST_VERSION STREQUAL 4)
+ find_package(Qt4 REQUIRED)
+ include(UseQt4)
+
+ set(QT_QTCORE_TARGET Qt4::QtCore)
+ set(QT_QTGUI_TARGET Qt4::QtGui)
+
+ # Qt macros
+ macro(qtx_wrap_cpp)
+ qt4_wrap_cpp(${ARGN})
+ endmacro()
+ macro(qtx_generate_moc)
+ qt4_generate_moc(${ARGN})
+ endmacro()
+
+elseif(QT_TEST_VERSION STREQUAL 5)
+ find_package(Qt5Widgets REQUIRED)
+
+ set(QT_QTCORE_TARGET Qt5::Core)
+ set(QT_QTGUI_TARGET Qt5::Widgets)
+
+ include_directories(${Qt5Widgets_INCLUDE_DIRS})
+ set(QT_LIBRARIES Qt5::Widgets)
+
+ if(Qt5_POSITION_INDEPENDENT_CODE AND CMAKE_CXX_COMPILE_OPTIONS_PIC)
+ add_definitions(${CMAKE_CXX_COMPILE_OPTIONS_PIC})
+ endif()
+
+ # Qt macros
+ macro(qtx_wrap_cpp)
+ qt5_wrap_cpp(${ARGN})
+ endmacro()
+ macro(qtx_generate_moc)
+ qt5_generate_moc(${ARGN})
+ endmacro()
+
+else()
+ message(SEND_ERROR "Invalid Qt version specified: ${QT_TEST_VERSION}")
+endif()
+
+# Get Qt compile features
+get_property(QT_COMPILE_FEATURES
+ TARGET ${QT_QTCORE_TARGET}
+ PROPERTY INTERFACE_COMPILE_FEATURES
+)
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt
deleted file mode 100644
index dff9d0c..0000000
--- a/Tests/QtAutogen/CMakeLists.txt
+++ /dev/null
@@ -1,233 +0,0 @@
-cmake_minimum_required(VERSION 3.9)
-cmake_policy(SET CMP0071 NEW)
-project(QtAutogen)
-
-if (QT_TEST_VERSION STREQUAL 4)
- find_package(Qt4 REQUIRED)
-
- # Include this directory before using the UseQt4 file.
- add_subdirectory(defines_test)
-
- include(UseQt4)
-
- set(QT_QTCORE_TARGET Qt4::QtCore)
-
- macro(qtx_wrap_cpp)
- qt4_wrap_cpp(${ARGN})
- endmacro()
- macro(qtx_generate_moc)
- qt4_generate_moc(${ARGN})
- endmacro()
-
-else()
- if (NOT QT_TEST_VERSION STREQUAL 5)
- message(SEND_ERROR "Invalid Qt version specified.")
- endif()
- find_package(Qt5Widgets REQUIRED)
-
- set(QT_QTCORE_TARGET Qt5::Core)
-
- include_directories(${Qt5Widgets_INCLUDE_DIRS})
- set(QT_LIBRARIES Qt5::Widgets)
-
- if(Qt5_POSITION_INDEPENDENT_CODE AND CMAKE_CXX_COMPILE_OPTIONS_PIC)
- add_definitions(${CMAKE_CXX_COMPILE_OPTIONS_PIC})
- endif()
-
- macro(qtx_wrap_cpp)
- qt5_wrap_cpp(${ARGN})
- endmacro()
- macro(qtx_generate_moc)
- qt5_generate_moc(${ARGN})
- endmacro()
-
-endif()
-
-get_property(QT_COMPILE_FEATURES TARGET ${QT_QTCORE_TARGET} PROPERTY INTERFACE_COMPILE_FEATURES)
-
-# Qt4 moc does not support utf8 paths in _parameter files generated by
-# qtx_wrap_cpp
-# https://bugreports.qt.io/browse/QTBUG-35480
-# Do a simple check if there is are non ASCII character in the build path
-string(REGEX MATCH "[^ -~]+" NON_ASCII_BDIR ${CMAKE_CURRENT_BINARY_DIR})
-if((NOT NON_ASCII_BDIR) OR (NOT QT_TEST_VERSION STREQUAL 4))
- set(ALLOW_WRAP_CPP TRUE)
-endif()
-# On windows qtx_wrap_cpp also fails in Qt5 when used on a path that
-# contains non ASCII characters
-if(NON_ASCII_BDIR AND WIN32)
- set(ALLOW_WRAP_CPP FALSE)
-endif()
-
-# -- Test
-# MOC only
-add_executable(mocOnly mocOnlySource/main.cpp mocOnlySource/StyleA.cpp mocOnlySource/StyleB.cpp)
-set_property(TARGET mocOnly PROPERTY AUTOMOC ON)
-target_link_libraries(mocOnly ${QT_LIBRARIES})
-
-add_executable(mocOnlyOpts mocOnlySource/main.cpp mocOnlySource/StyleA.cpp mocOnlySource/StyleB.cpp)
-set_property(TARGET mocOnlyOpts PROPERTY AUTOMOC ON)
-set_property(TARGET mocOnlyOpts PROPERTY AUTOMOC_MOC_OPTIONS "-nw")
-target_link_libraries(mocOnlyOpts ${QT_LIBRARIES})
-
-# -- Test
-# UIC only
-if(ALLOW_WRAP_CPP)
- qtx_wrap_cpp(uicOnlyMoc uicOnlySource/uiconly.h)
- add_executable(uicOnly uicOnlySource/uiconly.cpp ${uicOnlyMoc})
- set_property(TARGET uicOnly PROPERTY AUTOUIC ON)
- target_link_libraries(uicOnly ${QT_LIBRARIES})
-endif()
-
-# -- Test
-# RCC only
-add_executable(rccOnly rccOnly.cpp rccOnlyRes.qrc)
-set_property(TARGET rccOnly PROPERTY AUTORCC ON)
-target_link_libraries(rccOnly ${QT_QTCORE_TARGET})
-
-# -- Test
-# RCC empty
-add_executable(rccEmpty rccEmpty.cpp rccEmptyRes.qrc)
-set_property(TARGET rccEmpty PROPERTY AUTORCC ON)
-target_link_libraries(rccEmpty ${QT_QTCORE_TARGET})
-
-# -- Test
-# Add not_generated_file.qrc to the source list to get the file-level
-# dependency, but don't generate a c++ file from it. Disable the AUTORCC
-# feature for this target. This tests that qrc files in the sources don't
-# have an effect on generation if AUTORCC is off.
-add_library(empty STATIC empty.cpp not_generated_file.qrc)
-set_target_properties(empty PROPERTIES AUTORCC OFF)
-set_target_properties(empty PROPERTIES AUTOMOC TRUE)
-target_link_libraries(empty no_link_language)
-add_library(no_link_language STATIC empty.h)
-set_target_properties(no_link_language PROPERTIES AUTOMOC TRUE)
-# Pass Qt compiler features to targets that don't link against Qt
-target_compile_features(no_link_language PRIVATE ${QT_COMPILE_FEATURES})
-target_compile_features(empty PRIVATE ${QT_COMPILE_FEATURES})
-
-
-# -- Test
-# Test for SKIP_AUTOMOC and SKIP_AUTOGEN on an AUTOMOC enabled target
-if(ALLOW_WRAP_CPP)
- # Generate header mocs manually
- qtx_wrap_cpp(skipMocWrapMoc
- skipSource/qItemA.hpp
- skipSource/qItemB.hpp
- skipSource/qItemC.hpp
- skipSource/qItemD.hpp
- )
- set(skipMocSources
- skipMoc.cpp
- skipSource/qItemA.cpp
- skipSource/qItemB.cpp
- skipSource/qItemC.cpp
- skipSource/qItemD.cpp
- )
- # When cpp files are skipped, the hpp won't be processed either,
- # unless they are mentioned in the sources - which they aren't.
- set_property(SOURCE skipSource/qItemA.cpp PROPERTY SKIP_AUTOMOC ON)
- set_property(SOURCE skipSource/qItemB.cpp PROPERTY SKIP_AUTOGEN ON)
- # When hpp files are skipped, the cpp still get processed.
- set_property(SOURCE skipSource/qItemC.hpp PROPERTY SKIP_AUTOMOC ON)
- set_property(SOURCE skipSource/qItemD.hpp PROPERTY SKIP_AUTOGEN ON)
- # AUTOMOC enabled only
- add_executable(skipMocA ${skipMocSources} ${skipMocWrapMoc})
- set_property(TARGET skipMocA PROPERTY AUTOMOC ON)
- target_link_libraries(skipMocA ${QT_LIBRARIES})
- # AUTOMOC and AUTOUIC enabled
- add_executable(skipMocB ${skipMocSources} ${skipMocWrapMoc})
- set_property(TARGET skipMocB PROPERTY AUTOMOC ON)
- set_property(TARGET skipMocB PROPERTY AUTOUIC ON)
- target_link_libraries(skipMocB ${QT_LIBRARIES})
-endif()
-
-# -- Test
-# Test for SKIP_AUTOUIC and SKIP_AUTOGEN on an AUTOUIC enabled target
-set(skipUicSources
- skipUic.cpp
- skipSource/skipUicGen.cpp
- skipSource/skipUicNoGen1.cpp
- skipSource/skipUicNoGen2.cpp
-)
-set_property(SOURCE skipSource/skipUicNoGen1.cpp PROPERTY SKIP_AUTOUIC ON)
-set_property(SOURCE skipSource/skipUicNoGen2.cpp PROPERTY SKIP_AUTOGEN ON)
-# AUTOUIC enabled
-add_executable(skipUicA ${skipUicSources})
-set_property(TARGET skipUicA PROPERTY AUTOUIC ON)
-target_link_libraries(skipUicA ${QT_LIBRARIES})
-# AUTOUIC and AUTOMOC enabled
-add_executable(skipUicB ${skipUicSources})
-set_property(TARGET skipUicB PROPERTY AUTOUIC ON)
-set_property(TARGET skipUicB PROPERTY AUTOMOC ON)
-target_link_libraries(skipUicB ${QT_LIBRARIES})
-
-# -- Test
-# Test for SKIP_AUTORCC and SKIP_AUTOGEN on an AUTORCC enabled target
-set(skipRccSources
- skipRcc.cpp
- skipSource/skipRccBad1.qrc
- skipSource/skipRccBad2.qrc
- skipSource/skipRccGood.qrc
-)
-set_property(SOURCE skipSource/skipRccBad1.qrc PROPERTY SKIP_AUTORCC ON)
-set_property(SOURCE skipSource/skipRccBad2.qrc PROPERTY SKIP_AUTOGEN ON)
-# AUTORCC enabled
-add_executable(skipRccA ${skipRccSources})
-set_property(TARGET skipRccA PROPERTY AUTORCC ON)
-target_link_libraries(skipRccA ${QT_LIBRARIES})
-# AUTORCC, AUTOUIC and AUTOMOC enabled
-add_executable(skipRccB ${skipRccSources})
-set_property(TARGET skipRccB PROPERTY AUTORCC ON)
-set_property(TARGET skipRccB PROPERTY AUTOUIC ON)
-set_property(TARGET skipRccB PROPERTY AUTOMOC ON)
-target_link_libraries(skipRccB ${QT_LIBRARIES})
-
-# -- Test
-# MOC AUTOMOC_MACRO_NAMES
-if (NOT QT_TEST_VERSION STREQUAL 4)
- add_subdirectory(mocMacroName)
-endif()
-
-# -- Test
-# Tests AUTOMOC with generated sources
-add_subdirectory(mocDepends)
-
-# -- Test
-# Tests various include moc patterns
-if(ALLOW_WRAP_CPP)
- add_subdirectory(mocIncludeStrict)
- add_subdirectory(mocIncludeRelaxed)
-endif()
-
-# -- Test
-# Tests policy 0071
-if(ALLOW_WRAP_CPP)
- add_subdirectory(mocCMP0071)
-endif()
-
-# -- Test
-# Tests various .ui include directories
-add_subdirectory(uicInclude)
-
-# -- Test
-# OBJECT libraries
-add_subdirectory(objectLibrary)
-
-# -- Test
-# MacOS Framework
-if(APPLE AND (NOT QT_TEST_VERSION STREQUAL 4))
- add_subdirectory(macosFW)
-endif()
-
-# -- Test
-# Source files with the same basename in different subdirectories
-add_subdirectory(sameName)
-
-# -- Test
-# Tests static library cycles
-add_subdirectory(staticLibraryCycle)
-
-# -- Test
-# Complex test case
-add_subdirectory(complex)
diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake
new file mode 100644
index 0000000..c56780e
--- /dev/null
+++ b/Tests/QtAutogen/CommonTests.cmake
@@ -0,0 +1,40 @@
+# Autogen tests common for Qt4 and Qt5
+ADD_AUTOGEN_TEST(MocOnly mocOnly)
+ADD_AUTOGEN_TEST(MocOptions mocOptions)
+if(QT_TEST_ALLOW_QT_MACROS)
+ ADD_AUTOGEN_TEST(UicOnly uicOnly)
+endif()
+ADD_AUTOGEN_TEST(RccOnly rccOnly)
+ADD_AUTOGEN_TEST(RccEmpty rccEmpty)
+ADD_AUTOGEN_TEST(RccOffMocLibrary)
+if(QT_TEST_ALLOW_QT_MACROS)
+ ADD_AUTOGEN_TEST(MocSkipSource)
+endif()
+ADD_AUTOGEN_TEST(UicSkipSource)
+ADD_AUTOGEN_TEST(RccSkipSource)
+if(NOT QT_TEST_VERSION STREQUAL 4)
+ ADD_AUTOGEN_TEST(MocMacroName mocMacroName)
+endif()
+ADD_AUTOGEN_TEST(MocDepends)
+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()
+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)
+endif()
+ADD_AUTOGEN_TEST(SameName sameName)
+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()
+ADD_AUTOGEN_TEST(RerunRccDepends)
diff --git a/Tests/QtAutogen/complex/Adir/CMakeLists.txt b/Tests/QtAutogen/Complex/Adir/CMakeLists.txt
index a1c36ff..a1c36ff 100644
--- a/Tests/QtAutogen/complex/Adir/CMakeLists.txt
+++ b/Tests/QtAutogen/Complex/Adir/CMakeLists.txt
diff --git a/Tests/QtAutogen/complex/Adir/libA.cpp b/Tests/QtAutogen/Complex/Adir/libA.cpp
index f79f24a..f79f24a 100644
--- a/Tests/QtAutogen/complex/Adir/libA.cpp
+++ b/Tests/QtAutogen/Complex/Adir/libA.cpp
diff --git a/Tests/QtAutogen/complex/Adir/libA.h b/Tests/QtAutogen/Complex/Adir/libA.h
index c4eb9f7..c4eb9f7 100644
--- a/Tests/QtAutogen/complex/Adir/libA.h
+++ b/Tests/QtAutogen/Complex/Adir/libA.h
diff --git a/Tests/QtAutogen/complex/Bdir/CMakeLists.txt b/Tests/QtAutogen/Complex/Bdir/CMakeLists.txt
index d338763..d338763 100644
--- a/Tests/QtAutogen/complex/Bdir/CMakeLists.txt
+++ b/Tests/QtAutogen/Complex/Bdir/CMakeLists.txt
diff --git a/Tests/QtAutogen/complex/Bdir/libB.cpp b/Tests/QtAutogen/Complex/Bdir/libB.cpp
index d3b6753..d3b6753 100644
--- a/Tests/QtAutogen/complex/Bdir/libB.cpp
+++ b/Tests/QtAutogen/Complex/Bdir/libB.cpp
diff --git a/Tests/QtAutogen/complex/Bdir/libB.h b/Tests/QtAutogen/Complex/Bdir/libB.h
index e4ab788..e4ab788 100644
--- a/Tests/QtAutogen/complex/Bdir/libB.h
+++ b/Tests/QtAutogen/Complex/Bdir/libB.h
diff --git a/Tests/QtAutogen/complex/CMakeLists.txt b/Tests/QtAutogen/Complex/CMakeLists.txt
index 2043ccf..e9feea0 100644
--- a/Tests/QtAutogen/complex/CMakeLists.txt
+++ b/Tests/QtAutogen/Complex/CMakeLists.txt
@@ -1,4 +1,6 @@
-cmake_minimum_required(VERSION 3.9)
+cmake_minimum_required(VERSION 3.10)
+project(Complex)
+include("../AutogenTest.cmake")
# -- Test: AUTOMOC AUTORCC AUTOUIC
add_definitions(-DFOO -DSomeDefine="Barx")
@@ -20,7 +22,7 @@ add_custom_command(
OUTPUT generated.txt
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/generated.txt.in" "${CMAKE_CURRENT_BINARY_DIR}/generated.txt"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/generated.txt.in"
- )
+)
add_custom_target(generate_moc_input
DEPENDS generated.txt
diff --git a/Tests/QtAutogen/complex/abc.cpp b/Tests/QtAutogen/Complex/abc.cpp
index 2929b92..2929b92 100644
--- a/Tests/QtAutogen/complex/abc.cpp
+++ b/Tests/QtAutogen/Complex/abc.cpp
diff --git a/Tests/QtAutogen/complex/abc.h b/Tests/QtAutogen/Complex/abc.h
index ec5f411..ec5f411 100644
--- a/Tests/QtAutogen/complex/abc.h
+++ b/Tests/QtAutogen/Complex/abc.h
diff --git a/Tests/QtAutogen/complex/abc_p.h b/Tests/QtAutogen/Complex/abc_p.h
index be98487..be98487 100644
--- a/Tests/QtAutogen/complex/abc_p.h
+++ b/Tests/QtAutogen/Complex/abc_p.h
diff --git a/Tests/QtAutogen/complex/bar.cpp b/Tests/QtAutogen/Complex/bar.cpp
index 734bd7a..734bd7a 100644
--- a/Tests/QtAutogen/complex/bar.cpp
+++ b/Tests/QtAutogen/Complex/bar.cpp
diff --git a/Tests/QtAutogen/complex/blub.cpp b/Tests/QtAutogen/Complex/blub.cpp
index 1c497e0..1c497e0 100644
--- a/Tests/QtAutogen/complex/blub.cpp
+++ b/Tests/QtAutogen/Complex/blub.cpp
diff --git a/Tests/QtAutogen/complex/blub.h b/Tests/QtAutogen/Complex/blub.h
index ff79878..ff79878 100644
--- a/Tests/QtAutogen/complex/blub.h
+++ b/Tests/QtAutogen/Complex/blub.h
diff --git a/Tests/QtAutogen/complex/calwidget.cpp b/Tests/QtAutogen/Complex/calwidget.cpp
index 380e982..380e982 100644
--- a/Tests/QtAutogen/complex/calwidget.cpp
+++ b/Tests/QtAutogen/Complex/calwidget.cpp
diff --git a/Tests/QtAutogen/complex/calwidget.h b/Tests/QtAutogen/Complex/calwidget.h
index 084d959..084d959 100644
--- a/Tests/QtAutogen/complex/calwidget.h
+++ b/Tests/QtAutogen/Complex/calwidget.h
diff --git a/Tests/QtAutogen/complex/calwidget.ui b/Tests/QtAutogen/Complex/calwidget.ui
index 1c245ca..1c245ca 100644
--- a/Tests/QtAutogen/complex/calwidget.ui
+++ b/Tests/QtAutogen/Complex/calwidget.ui
diff --git a/Tests/QtAutogen/complex/codeeditor.cpp b/Tests/QtAutogen/Complex/codeeditor.cpp
index 0caf8a7..0caf8a7 100644
--- a/Tests/QtAutogen/complex/codeeditor.cpp
+++ b/Tests/QtAutogen/Complex/codeeditor.cpp
diff --git a/Tests/QtAutogen/complex/codeeditor.h b/Tests/QtAutogen/Complex/codeeditor.h
index b410bd4..b410bd4 100644
--- a/Tests/QtAutogen/complex/codeeditor.h
+++ b/Tests/QtAutogen/Complex/codeeditor.h
diff --git a/Tests/QtAutogen/complex/debug_class.cpp b/Tests/QtAutogen/Complex/debug_class.cpp
index 46b09e7..46b09e7 100644
--- a/Tests/QtAutogen/complex/debug_class.cpp
+++ b/Tests/QtAutogen/Complex/debug_class.cpp
diff --git a/Tests/QtAutogen/complex/debug_class.h b/Tests/QtAutogen/Complex/debug_class.h
index c02f0ed..c02f0ed 100644
--- a/Tests/QtAutogen/complex/debug_class.h
+++ b/Tests/QtAutogen/Complex/debug_class.h
diff --git a/Tests/QtAutogen/complex/debug_class.ui b/Tests/QtAutogen/Complex/debug_class.ui
index dc2e1ac..dc2e1ac 100644
--- a/Tests/QtAutogen/complex/debug_class.ui
+++ b/Tests/QtAutogen/Complex/debug_class.ui
diff --git a/Tests/QtAutogen/complex/debug_resource.qrc b/Tests/QtAutogen/Complex/debug_resource.qrc
index db98b9b..db98b9b 100644
--- a/Tests/QtAutogen/complex/debug_resource.qrc
+++ b/Tests/QtAutogen/Complex/debug_resource.qrc
diff --git a/Tests/QtAutogen/complex/foo.cpp b/Tests/QtAutogen/Complex/foo.cpp
index f665eee..f665eee 100644
--- a/Tests/QtAutogen/complex/foo.cpp
+++ b/Tests/QtAutogen/Complex/foo.cpp
diff --git a/Tests/QtAutogen/complex/foo.h b/Tests/QtAutogen/Complex/foo.h
index 3e03fe6..3e03fe6 100644
--- a/Tests/QtAutogen/complex/foo.h
+++ b/Tests/QtAutogen/Complex/foo.h
diff --git a/Tests/QtAutogen/complex/gadget.cpp b/Tests/QtAutogen/Complex/gadget.cpp
index 23d95fa..23d95fa 100644
--- a/Tests/QtAutogen/complex/gadget.cpp
+++ b/Tests/QtAutogen/Complex/gadget.cpp
diff --git a/Tests/QtAutogen/complex/gadget.h b/Tests/QtAutogen/Complex/gadget.h
index 3253e31..3253e31 100644
--- a/Tests/QtAutogen/complex/gadget.h
+++ b/Tests/QtAutogen/Complex/gadget.h
diff --git a/Tests/QtAutogen/complex/generated.cpp b/Tests/QtAutogen/Complex/generated.cpp
index d514c61..d514c61 100644
--- a/Tests/QtAutogen/complex/generated.cpp
+++ b/Tests/QtAutogen/Complex/generated.cpp
diff --git a/Tests/QtAutogen/complex/generated.h b/Tests/QtAutogen/Complex/generated.h
index 62e1607..62e1607 100644
--- a/Tests/QtAutogen/complex/generated.h
+++ b/Tests/QtAutogen/Complex/generated.h
diff --git a/Tests/QtAutogen/complex/generated.txt.in b/Tests/QtAutogen/Complex/generated.txt.in
index 77507bb..77507bb 100644
--- a/Tests/QtAutogen/complex/generated.txt.in
+++ b/Tests/QtAutogen/Complex/generated.txt.in
diff --git a/Tests/QtAutogen/complex/generated_resource.qrc.in b/Tests/QtAutogen/Complex/generated_resource.qrc.in
index da5fa62..da5fa62 100644
--- a/Tests/QtAutogen/complex/generated_resource.qrc.in
+++ b/Tests/QtAutogen/Complex/generated_resource.qrc.in
diff --git a/Tests/QtAutogen/complex/libC.cpp b/Tests/QtAutogen/Complex/libC.cpp
index a3acff1..a3acff1 100644
--- a/Tests/QtAutogen/complex/libC.cpp
+++ b/Tests/QtAutogen/Complex/libC.cpp
diff --git a/Tests/QtAutogen/complex/libC.h b/Tests/QtAutogen/Complex/libC.h
index 3bc2bad..3bc2bad 100644
--- a/Tests/QtAutogen/complex/libC.h
+++ b/Tests/QtAutogen/Complex/libC.h
diff --git a/Tests/QtAutogen/complex/main.cpp b/Tests/QtAutogen/Complex/main.cpp
index d557c70..d557c70 100644
--- a/Tests/QtAutogen/complex/main.cpp
+++ b/Tests/QtAutogen/Complex/main.cpp
diff --git a/Tests/QtAutogen/complex/multiplewidgets.cpp b/Tests/QtAutogen/Complex/multiplewidgets.cpp
index fda36ea..fda36ea 100644
--- a/Tests/QtAutogen/complex/multiplewidgets.cpp
+++ b/Tests/QtAutogen/Complex/multiplewidgets.cpp
diff --git a/Tests/QtAutogen/complex/multiplewidgets.h b/Tests/QtAutogen/Complex/multiplewidgets.h
index a4d0a50..a4d0a50 100644
--- a/Tests/QtAutogen/complex/multiplewidgets.h
+++ b/Tests/QtAutogen/Complex/multiplewidgets.h
diff --git a/Tests/QtAutogen/complex/myinterface.h.in b/Tests/QtAutogen/Complex/myinterface.h.in
index c6c0ba1..c6c0ba1 100644
--- a/Tests/QtAutogen/complex/myinterface.h.in
+++ b/Tests/QtAutogen/Complex/myinterface.h.in
diff --git a/Tests/QtAutogen/complex/myotherinterface.h.in b/Tests/QtAutogen/Complex/myotherinterface.h.in
index d21e7af..d21e7af 100644
--- a/Tests/QtAutogen/complex/myotherinterface.h.in
+++ b/Tests/QtAutogen/Complex/myotherinterface.h.in
diff --git a/Tests/QtAutogen/complex/private_slot.cpp b/Tests/QtAutogen/Complex/private_slot.cpp
index ab1682a..ab1682a 100644
--- a/Tests/QtAutogen/complex/private_slot.cpp
+++ b/Tests/QtAutogen/Complex/private_slot.cpp
diff --git a/Tests/QtAutogen/complex/private_slot.h b/Tests/QtAutogen/Complex/private_slot.h
index 8041eb2..8041eb2 100644
--- a/Tests/QtAutogen/complex/private_slot.h
+++ b/Tests/QtAutogen/Complex/private_slot.h
diff --git a/Tests/QtAutogen/complex/resourcetester.cpp b/Tests/QtAutogen/Complex/resourcetester.cpp
index 4ecb6b4..4ecb6b4 100644
--- a/Tests/QtAutogen/complex/resourcetester.cpp
+++ b/Tests/QtAutogen/Complex/resourcetester.cpp
diff --git a/Tests/QtAutogen/complex/resourcetester.h b/Tests/QtAutogen/Complex/resourcetester.h
index dbdb3ad..dbdb3ad 100644
--- a/Tests/QtAutogen/complex/resourcetester.h
+++ b/Tests/QtAutogen/Complex/resourcetester.h
diff --git a/Tests/QtAutogen/complex/second_resource.qrc b/Tests/QtAutogen/Complex/second_resource.qrc
index 27bfb14..27bfb14 100644
--- a/Tests/QtAutogen/complex/second_resource.qrc
+++ b/Tests/QtAutogen/Complex/second_resource.qrc
diff --git a/Tests/QtAutogen/complex/second_widget.cpp b/Tests/QtAutogen/Complex/second_widget.cpp
index c575f10..c575f10 100644
--- a/Tests/QtAutogen/complex/second_widget.cpp
+++ b/Tests/QtAutogen/Complex/second_widget.cpp
diff --git a/Tests/QtAutogen/complex/second_widget.h b/Tests/QtAutogen/Complex/second_widget.h
index c7929c4..c7929c4 100644
--- a/Tests/QtAutogen/complex/second_widget.h
+++ b/Tests/QtAutogen/Complex/second_widget.h
diff --git a/Tests/QtAutogen/complex/second_widget.ui b/Tests/QtAutogen/Complex/second_widget.ui
index 4effa58..4effa58 100644
--- a/Tests/QtAutogen/complex/second_widget.ui
+++ b/Tests/QtAutogen/Complex/second_widget.ui
diff --git a/Tests/QtAutogen/complex/sub/bar.h b/Tests/QtAutogen/Complex/sub/bar.h
index e4093f6..e4093f6 100644
--- a/Tests/QtAutogen/complex/sub/bar.h
+++ b/Tests/QtAutogen/Complex/sub/bar.h
diff --git a/Tests/QtAutogen/complex/targetObjectsTest.cpp b/Tests/QtAutogen/Complex/targetObjectsTest.cpp
index 766b775..766b775 100644
--- a/Tests/QtAutogen/complex/targetObjectsTest.cpp
+++ b/Tests/QtAutogen/Complex/targetObjectsTest.cpp
diff --git a/Tests/QtAutogen/complex/test.qrc b/Tests/QtAutogen/Complex/test.qrc
index c3d4e3c..c3d4e3c 100644
--- a/Tests/QtAutogen/complex/test.qrc
+++ b/Tests/QtAutogen/Complex/test.qrc
diff --git a/Tests/QtAutogen/complex/widget1.ui b/Tests/QtAutogen/Complex/widget1.ui
index 8fce81a..8fce81a 100644
--- a/Tests/QtAutogen/complex/widget1.ui
+++ b/Tests/QtAutogen/Complex/widget1.ui
diff --git a/Tests/QtAutogen/complex/widget2.ui b/Tests/QtAutogen/Complex/widget2.ui
index 1f411b9..1f411b9 100644
--- a/Tests/QtAutogen/complex/widget2.ui
+++ b/Tests/QtAutogen/Complex/widget2.ui
diff --git a/Tests/QtAutogen/complex/xyz.cpp b/Tests/QtAutogen/Complex/xyz.cpp
index e46c9d3..e46c9d3 100644
--- a/Tests/QtAutogen/complex/xyz.cpp
+++ b/Tests/QtAutogen/Complex/xyz.cpp
diff --git a/Tests/QtAutogen/complex/xyz.h b/Tests/QtAutogen/Complex/xyz.h
index 8b813fd..8b813fd 100644
--- a/Tests/QtAutogen/complex/xyz.h
+++ b/Tests/QtAutogen/Complex/xyz.h
diff --git a/Tests/QtAutogen/complex/yaf.cpp b/Tests/QtAutogen/Complex/yaf.cpp
index 70e26aa..70e26aa 100644
--- a/Tests/QtAutogen/complex/yaf.cpp
+++ b/Tests/QtAutogen/Complex/yaf.cpp
diff --git a/Tests/QtAutogen/complex/yaf.h b/Tests/QtAutogen/Complex/yaf.h
index f271061..f271061 100644
--- a/Tests/QtAutogen/complex/yaf.h
+++ b/Tests/QtAutogen/Complex/yaf.h
diff --git a/Tests/QtAutogen/complex/yaf_p.h b/Tests/QtAutogen/Complex/yaf_p.h
index ea5eed6..ea5eed6 100644
--- a/Tests/QtAutogen/complex/yaf_p.h
+++ b/Tests/QtAutogen/Complex/yaf_p.h
diff --git a/Tests/QtAutogen/DefinesTest/CMakeLists.txt b/Tests/QtAutogen/DefinesTest/CMakeLists.txt
new file mode 100644
index 0000000..de22845
--- /dev/null
+++ b/Tests/QtAutogen/DefinesTest/CMakeLists.txt
@@ -0,0 +1,13 @@
+cmake_minimum_required(VERSION 3.10)
+project(DefinesTest)
+
+# Qt4 only definitions test
+if(NOT QT_TEST_VERSION STREQUAL 4)
+ message(ERROR "Invalid Qt test version. This test is for Qt4 only.")
+endif()
+
+find_package(Qt4 REQUIRED)
+
+add_executable(DefinesTest defines_test.cpp)
+set_target_properties(DefinesTest PROPERTIES AUTOMOC TRUE)
+target_link_libraries(DefinesTest Qt4::QtGui)
diff --git a/Tests/QtAutogenRerun/defines_test/defines_test.cpp b/Tests/QtAutogen/DefinesTest/defines_test.cpp
index cf4e9cb..cf4e9cb 100644
--- a/Tests/QtAutogenRerun/defines_test/defines_test.cpp
+++ b/Tests/QtAutogen/DefinesTest/defines_test.cpp
diff --git a/Tests/QtAutogen/macosFW/CMakeLists.txt b/Tests/QtAutogen/MacOsFW/CMakeLists.txt
index 114d9ba..26d2019 100644
--- a/Tests/QtAutogen/macosFW/CMakeLists.txt
+++ b/Tests/QtAutogen/MacOsFW/CMakeLists.txt
@@ -1,5 +1,6 @@
-cmake_minimum_required(VERSION 3.8)
-project(macos-fw-test)
+cmake_minimum_required(VERSION 3.10)
+project(MacOsFW)
+include("../AutogenTest.cmake")
find_package(Qt5Test REQUIRED)
diff --git a/Tests/QtAutogen/macosFW/src/CMakeLists.txt b/Tests/QtAutogen/MacOsFW/src/CMakeLists.txt
index a02be00..a02be00 100644
--- a/Tests/QtAutogen/macosFW/src/CMakeLists.txt
+++ b/Tests/QtAutogen/MacOsFW/src/CMakeLists.txt
diff --git a/Tests/QtAutogen/macosFW/src/macos_fw_lib.cpp b/Tests/QtAutogen/MacOsFW/src/macos_fw_lib.cpp
index 881a8c9..881a8c9 100644
--- a/Tests/QtAutogen/macosFW/src/macos_fw_lib.cpp
+++ b/Tests/QtAutogen/MacOsFW/src/macos_fw_lib.cpp
diff --git a/Tests/QtAutogen/macosFW/src/macos_fw_lib.h b/Tests/QtAutogen/MacOsFW/src/macos_fw_lib.h
index e66e0ea..e66e0ea 100644
--- a/Tests/QtAutogen/macosFW/src/macos_fw_lib.h
+++ b/Tests/QtAutogen/MacOsFW/src/macos_fw_lib.h
diff --git a/Tests/QtAutogen/macosFW/test/CMakeLists.txt b/Tests/QtAutogen/MacOsFW/test/CMakeLists.txt
index 521c184..521c184 100644
--- a/Tests/QtAutogen/macosFW/test/CMakeLists.txt
+++ b/Tests/QtAutogen/MacOsFW/test/CMakeLists.txt
diff --git a/Tests/QtAutogen/macosFW/test/testMacosFWLib.cpp b/Tests/QtAutogen/MacOsFW/test/testMacosFWLib.cpp
index 3476d61..3476d61 100644
--- a/Tests/QtAutogen/macosFW/test/testMacosFWLib.cpp
+++ b/Tests/QtAutogen/MacOsFW/test/testMacosFWLib.cpp
diff --git a/Tests/QtAutogen/macosFW/test/testMacosFWLib.h b/Tests/QtAutogen/MacOsFW/test/testMacosFWLib.h
index 1fe8dae..1fe8dae 100644
--- a/Tests/QtAutogen/macosFW/test/testMacosFWLib.h
+++ b/Tests/QtAutogen/MacOsFW/test/testMacosFWLib.h
diff --git a/Tests/QtAutogen/MocCMP0071/CMakeLists.txt b/Tests/QtAutogen/MocCMP0071/CMakeLists.txt
new file mode 100644
index 0000000..a79f36e
--- /dev/null
+++ b/Tests/QtAutogen/MocCMP0071/CMakeLists.txt
@@ -0,0 +1,6 @@
+cmake_minimum_required(VERSION 3.10)
+project(MocCMP0071)
+include("../AutogenTest.cmake")
+
+add_subdirectory(OLD)
+add_subdirectory(NEW)
diff --git a/Tests/QtAutogen/mocCMP0071/NEW/CMakeLists.txt b/Tests/QtAutogen/MocCMP0071/NEW/CMakeLists.txt
index 0237afc..954fe3d 100644
--- a/Tests/QtAutogen/mocCMP0071/NEW/CMakeLists.txt
+++ b/Tests/QtAutogen/MocCMP0071/NEW/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.9)
+cmake_minimum_required(VERSION 3.10)
cmake_policy(SET CMP0071 NEW)
# *Generate* files
diff --git a/Tests/QtAutogen/mocCMP0071/OLD/CMakeLists.txt b/Tests/QtAutogen/MocCMP0071/OLD/CMakeLists.txt
index 5699433..68fa067 100644
--- a/Tests/QtAutogen/mocCMP0071/OLD/CMakeLists.txt
+++ b/Tests/QtAutogen/MocCMP0071/OLD/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.9)
+cmake_minimum_required(VERSION 3.10)
cmake_policy(SET CMP0071 OLD)
# *Generate* files
diff --git a/Tests/QtAutogen/mocCMP0071/Obj.cpp b/Tests/QtAutogen/MocCMP0071/Obj.cpp
index 1ae50ed..1ae50ed 100644
--- a/Tests/QtAutogen/mocCMP0071/Obj.cpp
+++ b/Tests/QtAutogen/MocCMP0071/Obj.cpp
diff --git a/Tests/QtAutogen/mocCMP0071/Obj.hpp b/Tests/QtAutogen/MocCMP0071/Obj.hpp
index f064e47..f064e47 100644
--- a/Tests/QtAutogen/mocCMP0071/Obj.hpp
+++ b/Tests/QtAutogen/MocCMP0071/Obj.hpp
diff --git a/Tests/QtAutogen/mocCMP0071/Obj_p.h b/Tests/QtAutogen/MocCMP0071/Obj_p.h
index cb1e5df..cb1e5df 100644
--- a/Tests/QtAutogen/mocCMP0071/Obj_p.h
+++ b/Tests/QtAutogen/MocCMP0071/Obj_p.h
diff --git a/Tests/QtAutogen/mocCMP0071/main.cpp b/Tests/QtAutogen/MocCMP0071/main.cpp
index 3887840..3887840 100644
--- a/Tests/QtAutogen/mocCMP0071/main.cpp
+++ b/Tests/QtAutogen/MocCMP0071/main.cpp
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
diff --git a/Tests/QtAutogen/mocInclude/EObjA.cpp b/Tests/QtAutogen/MocInclude/EObjA.cpp
index ca713b2..7681c29 100644
--- a/Tests/QtAutogen/mocInclude/EObjA.cpp
+++ b/Tests/QtAutogen/MocInclude/EObjA.cpp
@@ -35,6 +35,7 @@ EObjA::EObjA()
EObjA::~EObjA()
{
+ delete d;
}
// For EObjALocal
diff --git a/Tests/QtAutogen/mocInclude/EObjA.hpp b/Tests/QtAutogen/MocInclude/EObjA.hpp
index 0939ab6..0939ab6 100644
--- a/Tests/QtAutogen/mocInclude/EObjA.hpp
+++ b/Tests/QtAutogen/MocInclude/EObjA.hpp
diff --git a/Tests/QtAutogen/mocInclude/EObjAExtra.cpp b/Tests/QtAutogen/MocInclude/EObjAExtra.cpp
index 369ca8f..369ca8f 100644
--- a/Tests/QtAutogen/mocInclude/EObjAExtra.cpp
+++ b/Tests/QtAutogen/MocInclude/EObjAExtra.cpp
diff --git a/Tests/QtAutogen/mocInclude/EObjAExtra.hpp b/Tests/QtAutogen/MocInclude/EObjAExtra.hpp
index b10681d..b10681d 100644
--- a/Tests/QtAutogen/mocInclude/EObjAExtra.hpp
+++ b/Tests/QtAutogen/MocInclude/EObjAExtra.hpp
diff --git a/Tests/QtAutogen/mocInclude/EObjAExtra_p.hpp b/Tests/QtAutogen/MocInclude/EObjAExtra_p.hpp
index dea6cb5..dea6cb5 100644
--- a/Tests/QtAutogen/mocInclude/EObjAExtra_p.hpp
+++ b/Tests/QtAutogen/MocInclude/EObjAExtra_p.hpp
diff --git a/Tests/QtAutogen/mocInclude/EObjA_p.hpp b/Tests/QtAutogen/MocInclude/EObjA_p.hpp
index 1e0d7e1..1e0d7e1 100644
--- a/Tests/QtAutogen/mocInclude/EObjA_p.hpp
+++ b/Tests/QtAutogen/MocInclude/EObjA_p.hpp
diff --git a/Tests/QtAutogen/mocInclude/EObjB.cpp b/Tests/QtAutogen/MocInclude/EObjB.cpp
index d19fbfa..3068c68 100644
--- a/Tests/QtAutogen/mocInclude/EObjB.cpp
+++ b/Tests/QtAutogen/MocInclude/EObjB.cpp
@@ -35,6 +35,7 @@ EObjB::EObjB()
EObjB::~EObjB()
{
+ delete d;
}
// For EObjBLocal
diff --git a/Tests/QtAutogen/mocInclude/EObjB.hpp b/Tests/QtAutogen/MocInclude/EObjB.hpp
index 6632bdb..6632bdb 100644
--- a/Tests/QtAutogen/mocInclude/EObjB.hpp
+++ b/Tests/QtAutogen/MocInclude/EObjB.hpp
diff --git a/Tests/QtAutogen/mocInclude/EObjB_p.hpp b/Tests/QtAutogen/MocInclude/EObjB_p.hpp
index 2905f28..2905f28 100644
--- a/Tests/QtAutogen/mocInclude/EObjB_p.hpp
+++ b/Tests/QtAutogen/MocInclude/EObjB_p.hpp
diff --git a/Tests/QtAutogen/mocInclude/LObjA.cpp b/Tests/QtAutogen/MocInclude/LObjA.cpp
index 9aae991..9aae991 100644
--- a/Tests/QtAutogen/mocInclude/LObjA.cpp
+++ b/Tests/QtAutogen/MocInclude/LObjA.cpp
diff --git a/Tests/QtAutogen/mocInclude/LObjA.hpp b/Tests/QtAutogen/MocInclude/LObjA.hpp
index aac670c..aac670c 100644
--- a/Tests/QtAutogen/mocInclude/LObjA.hpp
+++ b/Tests/QtAutogen/MocInclude/LObjA.hpp
diff --git a/Tests/QtAutogen/mocInclude/LObjA_p.h b/Tests/QtAutogen/MocInclude/LObjA_p.h
index ebe8395..ebe8395 100644
--- a/Tests/QtAutogen/mocInclude/LObjA_p.h
+++ b/Tests/QtAutogen/MocInclude/LObjA_p.h
diff --git a/Tests/QtAutogen/mocInclude/LObjB.cpp b/Tests/QtAutogen/MocInclude/LObjB.cpp
index 7485d8f..7485d8f 100644
--- a/Tests/QtAutogen/mocInclude/LObjB.cpp
+++ b/Tests/QtAutogen/MocInclude/LObjB.cpp
diff --git a/Tests/QtAutogen/mocInclude/LObjB.hpp b/Tests/QtAutogen/MocInclude/LObjB.hpp
index eb4e58d..eb4e58d 100644
--- a/Tests/QtAutogen/mocInclude/LObjB.hpp
+++ b/Tests/QtAutogen/MocInclude/LObjB.hpp
diff --git a/Tests/QtAutogen/mocInclude/LObjB_p.h b/Tests/QtAutogen/MocInclude/LObjB_p.h
index b871f2d..b871f2d 100644
--- a/Tests/QtAutogen/mocInclude/LObjB_p.h
+++ b/Tests/QtAutogen/MocInclude/LObjB_p.h
diff --git a/Tests/QtAutogen/mocInclude/ObjA.cpp b/Tests/QtAutogen/MocInclude/ObjA.cpp
index 6f6b90e..6f6b90e 100644
--- a/Tests/QtAutogen/mocInclude/ObjA.cpp
+++ b/Tests/QtAutogen/MocInclude/ObjA.cpp
diff --git a/Tests/QtAutogen/mocInclude/ObjA.hpp b/Tests/QtAutogen/MocInclude/ObjA.hpp
index f16c924..f16c924 100644
--- a/Tests/QtAutogen/mocInclude/ObjA.hpp
+++ b/Tests/QtAutogen/MocInclude/ObjA.hpp
diff --git a/Tests/QtAutogen/mocInclude/ObjA_p.h b/Tests/QtAutogen/MocInclude/ObjA_p.h
index eb60c98..eb60c98 100644
--- a/Tests/QtAutogen/mocInclude/ObjA_p.h
+++ b/Tests/QtAutogen/MocInclude/ObjA_p.h
diff --git a/Tests/QtAutogen/mocInclude/ObjB.cpp b/Tests/QtAutogen/MocInclude/ObjB.cpp
index a6f2509..a6f2509 100644
--- a/Tests/QtAutogen/mocInclude/ObjB.cpp
+++ b/Tests/QtAutogen/MocInclude/ObjB.cpp
diff --git a/Tests/QtAutogen/mocInclude/ObjB.hpp b/Tests/QtAutogen/MocInclude/ObjB.hpp
index 2ac8d17..2ac8d17 100644
--- a/Tests/QtAutogen/mocInclude/ObjB.hpp
+++ b/Tests/QtAutogen/MocInclude/ObjB.hpp
diff --git a/Tests/QtAutogen/mocInclude/ObjB_p.h b/Tests/QtAutogen/MocInclude/ObjB_p.h
index 418da65..418da65 100644
--- a/Tests/QtAutogen/mocInclude/ObjB_p.h
+++ b/Tests/QtAutogen/MocInclude/ObjB_p.h
diff --git a/Tests/QtAutogen/mocInclude/SObjA.cpp b/Tests/QtAutogen/MocInclude/SObjA.cpp
index 7e75bf9..7e75bf9 100644
--- a/Tests/QtAutogen/mocInclude/SObjA.cpp
+++ b/Tests/QtAutogen/MocInclude/SObjA.cpp
diff --git a/Tests/QtAutogen/mocInclude/SObjA.hpp b/Tests/QtAutogen/MocInclude/SObjA.hpp
index 1436abc..1436abc 100644
--- a/Tests/QtAutogen/mocInclude/SObjA.hpp
+++ b/Tests/QtAutogen/MocInclude/SObjA.hpp
diff --git a/Tests/QtAutogen/mocInclude/SObjB.cpp.in b/Tests/QtAutogen/MocInclude/SObjB.cpp.in
index b1cc12a..b1cc12a 100644
--- a/Tests/QtAutogen/mocInclude/SObjB.cpp.in
+++ b/Tests/QtAutogen/MocInclude/SObjB.cpp.in
diff --git a/Tests/QtAutogen/mocInclude/SObjB.hpp.in b/Tests/QtAutogen/MocInclude/SObjB.hpp.in
index 5e396ae..5e396ae 100644
--- a/Tests/QtAutogen/mocInclude/SObjB.hpp.in
+++ b/Tests/QtAutogen/MocInclude/SObjB.hpp.in
diff --git a/Tests/QtAutogen/mocInclude/SObjC.cpp b/Tests/QtAutogen/MocInclude/SObjC.cpp
index 1e8d397..1e8d397 100644
--- a/Tests/QtAutogen/mocInclude/SObjC.cpp
+++ b/Tests/QtAutogen/MocInclude/SObjC.cpp
diff --git a/Tests/QtAutogen/mocInclude/SObjC.hpp b/Tests/QtAutogen/MocInclude/SObjC.hpp
index def0f9d..def0f9d 100644
--- a/Tests/QtAutogen/mocInclude/SObjC.hpp
+++ b/Tests/QtAutogen/MocInclude/SObjC.hpp
diff --git a/Tests/QtAutogen/mocInclude/SObjCExtra.cpp b/Tests/QtAutogen/MocInclude/SObjCExtra.cpp
index 55dd1c3..55dd1c3 100644
--- a/Tests/QtAutogen/mocInclude/SObjCExtra.cpp
+++ b/Tests/QtAutogen/MocInclude/SObjCExtra.cpp
diff --git a/Tests/QtAutogen/mocInclude/SObjCExtra.hpp b/Tests/QtAutogen/MocInclude/SObjCExtra.hpp
index 08545ac..08545ac 100644
--- a/Tests/QtAutogen/mocInclude/SObjCExtra.hpp
+++ b/Tests/QtAutogen/MocInclude/SObjCExtra.hpp
diff --git a/Tests/QtAutogen/mocInclude/SObjCExtra.moc.in b/Tests/QtAutogen/MocInclude/SObjCExtra.moc.in
index 00fc4aa..00fc4aa 100644
--- a/Tests/QtAutogen/mocInclude/SObjCExtra.moc.in
+++ b/Tests/QtAutogen/MocInclude/SObjCExtra.moc.in
diff --git a/Tests/QtAutogen/mocInclude/shared.cmake b/Tests/QtAutogen/MocInclude/shared.cmake
index d05f27c..2ca2841 100644
--- a/Tests/QtAutogen/mocInclude/shared.cmake
+++ b/Tests/QtAutogen/MocInclude/shared.cmake
@@ -1,24 +1,24 @@
# Test moc include patterns
-include_directories("../mocInclude")
+include_directories("../MocInclude")
include_directories(${CMAKE_CURRENT_BINARY_DIR})
# Generate .moc file externally and enabled SKIP_AUTOMOC on the file
qtx_generate_moc(
- ${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjA.hpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjA.hpp
${CMAKE_CURRENT_BINARY_DIR}/SObjA.moc)
-set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjA.cpp PROPERTY SKIP_AUTOMOC ON)
+set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjA.cpp PROPERTY SKIP_AUTOMOC ON)
# Generate .moc file externally from generated source file
# and enabled SKIP_AUTOMOC on the source file
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/SObjB.hpp
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjB.hpp.in
+ ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjB.hpp.in
${CMAKE_CURRENT_BINARY_DIR}/SObjB.hpp)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/SObjB.cpp
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjB.cpp.in
+ ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjB.cpp.in
${CMAKE_CURRENT_BINARY_DIR}/SObjB.cpp)
qtx_generate_moc(
${CMAKE_CURRENT_BINARY_DIR}/SObjB.hpp
@@ -27,10 +27,10 @@ set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/SObjB.cpp PROPERTY SKIP_AUTOMOC
# Generate moc file externally and enabled SKIP_AUTOMOC on the header
qtx_generate_moc(
- ${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjCExtra.hpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjCExtra.hpp
${CMAKE_CURRENT_BINARY_DIR}/SObjCExtra_extMoc.cpp)
set_property(
- SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjCExtra.hpp
+ SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjCExtra.hpp
PROPERTY SKIP_AUTOMOC ON)
# Custom target to depend on
set(SOBJC_MOC ${CMAKE_CURRENT_BINARY_DIR}/moc_SObjCExtra.cpp)
@@ -38,32 +38,32 @@ add_custom_target("${MOC_INCLUDE_NAME}_SOBJC"
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/SObjCExtra_extMoc.cpp
BYPRODUCTS ${SOBJC_MOC}
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjCExtra.moc.in
+ ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjCExtra.moc.in
${SOBJC_MOC})
# MOC_INCLUDE_NAME must be defined by the includer
add_executable(${MOC_INCLUDE_NAME}
# Common sources
- ../mocInclude/ObjA.cpp
- ../mocInclude/ObjB.cpp
+ ../MocInclude/ObjA.cpp
+ ../MocInclude/ObjB.cpp
- ../mocInclude/LObjA.cpp
- ../mocInclude/LObjB.cpp
+ ../MocInclude/LObjA.cpp
+ ../MocInclude/LObjB.cpp
- ../mocInclude/EObjA.cpp
- ../mocInclude/EObjAExtra.cpp
- ../mocInclude/EObjB.cpp
- ../mocInclude/subExtra/EObjBExtra.cpp
+ ../MocInclude/EObjA.cpp
+ ../MocInclude/EObjAExtra.cpp
+ ../MocInclude/EObjB.cpp
+ ../MocInclude/subExtra/EObjBExtra.cpp
- ../mocInclude/SObjA.cpp
+ ../MocInclude/SObjA.cpp
${CMAKE_CURRENT_BINARY_DIR}/SObjA.moc
${CMAKE_CURRENT_BINARY_DIR}/SObjB.cpp
${CMAKE_CURRENT_BINARY_DIR}/SObjB.moc
- ../mocInclude/SObjC.cpp
- ../mocInclude/SObjCExtra.hpp
- ../mocInclude/SObjCExtra.cpp
+ ../MocInclude/SObjC.cpp
+ ../MocInclude/SObjCExtra.hpp
+ ../MocInclude/SObjCExtra.cpp
- ../mocInclude/subGlobal/GObj.cpp
+ ../MocInclude/subGlobal/GObj.cpp
main.cpp
)
add_dependencies(${MOC_INCLUDE_NAME} "${MOC_INCLUDE_NAME}_SOBJC")
diff --git a/Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.cpp b/Tests/QtAutogen/MocInclude/subExtra/EObjBExtra.cpp
index c697866..c697866 100644
--- a/Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.cpp
+++ b/Tests/QtAutogen/MocInclude/subExtra/EObjBExtra.cpp
diff --git a/Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.hpp b/Tests/QtAutogen/MocInclude/subExtra/EObjBExtra.hpp
index 3798d7f..3798d7f 100644
--- a/Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.hpp
+++ b/Tests/QtAutogen/MocInclude/subExtra/EObjBExtra.hpp
diff --git a/Tests/QtAutogen/mocInclude/subExtra/EObjBExtra_p.hpp b/Tests/QtAutogen/MocInclude/subExtra/EObjBExtra_p.hpp
index db8a096..db8a096 100644
--- a/Tests/QtAutogen/mocInclude/subExtra/EObjBExtra_p.hpp
+++ b/Tests/QtAutogen/MocInclude/subExtra/EObjBExtra_p.hpp
diff --git a/Tests/QtAutogen/mocInclude/subGlobal/GObj.cpp b/Tests/QtAutogen/MocInclude/subGlobal/GObj.cpp
index 6b92f21..6b92f21 100644
--- a/Tests/QtAutogen/mocInclude/subGlobal/GObj.cpp
+++ b/Tests/QtAutogen/MocInclude/subGlobal/GObj.cpp
diff --git a/Tests/QtAutogen/mocInclude/subGlobal/GObj.hpp b/Tests/QtAutogen/MocInclude/subGlobal/GObj.hpp
index 2f9ee82..2f9ee82 100644
--- a/Tests/QtAutogen/mocInclude/subGlobal/GObj.hpp
+++ b/Tests/QtAutogen/MocInclude/subGlobal/GObj.hpp
diff --git a/Tests/QtAutogen/mocInclude/subGlobal/GObj_p.hpp b/Tests/QtAutogen/MocInclude/subGlobal/GObj_p.hpp
index 7b37dfd..7b37dfd 100644
--- a/Tests/QtAutogen/mocInclude/subGlobal/GObj_p.hpp
+++ b/Tests/QtAutogen/MocInclude/subGlobal/GObj_p.hpp
diff --git a/Tests/QtAutogen/mocIncludeRelaxed/CMakeLists.txt b/Tests/QtAutogen/MocIncludeRelaxed/CMakeLists.txt
index 97ba1df..b1c4fc3 100644
--- a/Tests/QtAutogen/mocIncludeRelaxed/CMakeLists.txt
+++ b/Tests/QtAutogen/MocIncludeRelaxed/CMakeLists.txt
@@ -1,10 +1,13 @@
-# Test moc include patterns
+cmake_minimum_required(VERSION 3.10)
+project(MocIncludeRelaxed)
+include("../AutogenTest.cmake")
+# Test moc include patterns
set(CMAKE_AUTOMOC_RELAXED_MODE TRUE)
# Shared executable
set(MOC_INCLUDE_NAME "mocIncludeRelaxed")
-include(${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/shared.cmake)
+include(${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/shared.cmake)
# Relaxed ony executable
add_executable(mocIncludeRelaxedOnly
diff --git a/Tests/QtAutogen/mocIncludeRelaxed/RMain.cpp b/Tests/QtAutogen/MocIncludeRelaxed/RMain.cpp
index 5b2c070..5b2c070 100644
--- a/Tests/QtAutogen/mocIncludeRelaxed/RMain.cpp
+++ b/Tests/QtAutogen/MocIncludeRelaxed/RMain.cpp
diff --git a/Tests/QtAutogen/mocIncludeRelaxed/RObjA.cpp b/Tests/QtAutogen/MocIncludeRelaxed/RObjA.cpp
index 2e2cf6a..2e2cf6a 100644
--- a/Tests/QtAutogen/mocIncludeRelaxed/RObjA.cpp
+++ b/Tests/QtAutogen/MocIncludeRelaxed/RObjA.cpp
diff --git a/Tests/QtAutogen/mocIncludeRelaxed/RObjA.hpp b/Tests/QtAutogen/MocIncludeRelaxed/RObjA.hpp
index 5974187..5974187 100644
--- a/Tests/QtAutogen/mocIncludeRelaxed/RObjA.hpp
+++ b/Tests/QtAutogen/MocIncludeRelaxed/RObjA.hpp
diff --git a/Tests/QtAutogen/mocIncludeRelaxed/RObjB.cpp b/Tests/QtAutogen/MocIncludeRelaxed/RObjB.cpp
index c56d10f..c56d10f 100644
--- a/Tests/QtAutogen/mocIncludeRelaxed/RObjB.cpp
+++ b/Tests/QtAutogen/MocIncludeRelaxed/RObjB.cpp
diff --git a/Tests/QtAutogen/mocIncludeRelaxed/RObjB.hpp b/Tests/QtAutogen/MocIncludeRelaxed/RObjB.hpp
index d6d0474..d6d0474 100644
--- a/Tests/QtAutogen/mocIncludeRelaxed/RObjB.hpp
+++ b/Tests/QtAutogen/MocIncludeRelaxed/RObjB.hpp
diff --git a/Tests/QtAutogen/mocIncludeRelaxed/RObjBExtra.hpp b/Tests/QtAutogen/MocIncludeRelaxed/RObjBExtra.hpp
index 5d6be75..5d6be75 100644
--- a/Tests/QtAutogen/mocIncludeRelaxed/RObjBExtra.hpp
+++ b/Tests/QtAutogen/MocIncludeRelaxed/RObjBExtra.hpp
diff --git a/Tests/QtAutogen/mocIncludeRelaxed/RObjC.cpp b/Tests/QtAutogen/MocIncludeRelaxed/RObjC.cpp
index 4ba32f5..4ba32f5 100644
--- a/Tests/QtAutogen/mocIncludeRelaxed/RObjC.cpp
+++ b/Tests/QtAutogen/MocIncludeRelaxed/RObjC.cpp
diff --git a/Tests/QtAutogen/mocIncludeRelaxed/RObjC.hpp b/Tests/QtAutogen/MocIncludeRelaxed/RObjC.hpp
index 5552ede..5552ede 100644
--- a/Tests/QtAutogen/mocIncludeRelaxed/RObjC.hpp
+++ b/Tests/QtAutogen/MocIncludeRelaxed/RObjC.hpp
diff --git a/Tests/QtAutogen/mocIncludeStrict/main.cpp b/Tests/QtAutogen/MocIncludeRelaxed/main.cpp
index 5a3148d..5a3148d 100644
--- a/Tests/QtAutogen/mocIncludeStrict/main.cpp
+++ b/Tests/QtAutogen/MocIncludeRelaxed/main.cpp
diff --git a/Tests/QtAutogen/MocIncludeStrict/CMakeLists.txt b/Tests/QtAutogen/MocIncludeStrict/CMakeLists.txt
new file mode 100644
index 0000000..2cf0fed
--- /dev/null
+++ b/Tests/QtAutogen/MocIncludeStrict/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 3.10)
+project(MocIncludeStrict)
+include("../AutogenTest.cmake")
+
+# Test moc include patterns
+set(CMAKE_AUTOMOC_RELAXED_MODE FALSE)
+
+# Shared executable
+set(MOC_INCLUDE_NAME "mocIncludeStrict")
+include(${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/shared.cmake)
diff --git a/Tests/QtAutogen/mocIncludeRelaxed/main.cpp b/Tests/QtAutogen/MocIncludeStrict/main.cpp
index 5a3148d..5a3148d 100644
--- a/Tests/QtAutogen/mocIncludeRelaxed/main.cpp
+++ b/Tests/QtAutogen/MocIncludeStrict/main.cpp
diff --git a/Tests/QtAutogen/MocMacroName/CMakeLists.txt b/Tests/QtAutogen/MocMacroName/CMakeLists.txt
new file mode 100644
index 0000000..f0251a2
--- /dev/null
+++ b/Tests/QtAutogen/MocMacroName/CMakeLists.txt
@@ -0,0 +1,17 @@
+cmake_minimum_required(VERSION 3.10)
+project(MocMacroName)
+include("../AutogenTest.cmake")
+
+# Test CMAKE_AUTOMOC_MACRO_NAMES and AUTOMOC_MACRO_NAMES
+list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "QO1_ALIAS")
+
+add_executable(mocMacroName
+ main.cpp
+ Gadget.cpp
+ Object.cpp
+ Object1Aliased.cpp
+ Object2Aliased.cpp
+)
+set_property(TARGET mocMacroName PROPERTY AUTOMOC ON)
+set_property(TARGET mocMacroName APPEND PROPERTY AUTOMOC_MACRO_NAMES "QO2_ALIAS")
+target_link_libraries(mocMacroName ${QT_LIBRARIES})
diff --git a/Tests/QtAutogen/mocMacroName/CustomMacros.hpp b/Tests/QtAutogen/MocMacroName/CustomMacros.hpp
index 93e5bfd..93e5bfd 100644
--- a/Tests/QtAutogen/mocMacroName/CustomMacros.hpp
+++ b/Tests/QtAutogen/MocMacroName/CustomMacros.hpp
diff --git a/Tests/QtAutogen/mocMacroName/Gadget.cpp b/Tests/QtAutogen/MocMacroName/Gadget.cpp
index 167faeb..d7cb515 100644
--- a/Tests/QtAutogen/mocMacroName/Gadget.cpp
+++ b/Tests/QtAutogen/MocMacroName/Gadget.cpp
@@ -1,6 +1,6 @@
#include "Gadget.hpp"
Gadget::Gadget()
- : test(0)
+ : _test(0)
{
}
diff --git a/Tests/QtAutogen/mocMacroName/Gadget.hpp b/Tests/QtAutogen/MocMacroName/Gadget.hpp
index 2587ed2..cab792e 100644
--- a/Tests/QtAutogen/mocMacroName/Gadget.hpp
+++ b/Tests/QtAutogen/MocMacroName/Gadget.hpp
@@ -6,10 +6,14 @@
class Gadget
{
Q_GADGET
- Q_PROPERTY(int test MEMBER test)
+ Q_PROPERTY(int test READ getTest)
public:
Gadget();
- int test;
+
+ int getTest() { return _test; }
+
+private:
+ int _test;
};
#endif
diff --git a/Tests/QtAutogen/mocMacroName/Object.cpp b/Tests/QtAutogen/MocMacroName/Object.cpp
index c0b4f33..800ebf3 100644
--- a/Tests/QtAutogen/mocMacroName/Object.cpp
+++ b/Tests/QtAutogen/MocMacroName/Object.cpp
@@ -1,6 +1,7 @@
#include "Object.hpp"
Object::Object()
+ : _test(0)
{
}
diff --git a/Tests/QtAutogen/mocMacroName/Object.hpp b/Tests/QtAutogen/MocMacroName/Object.hpp
index 0c40824..aadae1f 100644
--- a/Tests/QtAutogen/mocMacroName/Object.hpp
+++ b/Tests/QtAutogen/MocMacroName/Object.hpp
@@ -6,14 +6,17 @@
class Object : public QObject
{
Q_OBJECT
- Q_PROPERTY(int test MEMBER test)
+ Q_PROPERTY(int test READ getTest)
public:
Object();
+ int getTest() { return _test; }
+
Q_SLOT
void aSlot();
- int test;
+private:
+ int _test;
};
#endif
diff --git a/Tests/QtAutogen/mocMacroName/Object1Aliased.cpp b/Tests/QtAutogen/MocMacroName/Object1Aliased.cpp
index b8b4806..b8b4806 100644
--- a/Tests/QtAutogen/mocMacroName/Object1Aliased.cpp
+++ b/Tests/QtAutogen/MocMacroName/Object1Aliased.cpp
diff --git a/Tests/QtAutogen/mocMacroName/Object1Aliased.hpp b/Tests/QtAutogen/MocMacroName/Object1Aliased.hpp
index 6c6bb40..6c6bb40 100644
--- a/Tests/QtAutogen/mocMacroName/Object1Aliased.hpp
+++ b/Tests/QtAutogen/MocMacroName/Object1Aliased.hpp
diff --git a/Tests/QtAutogen/mocMacroName/Object2Aliased.cpp b/Tests/QtAutogen/MocMacroName/Object2Aliased.cpp
index 4b09dd1..4b09dd1 100644
--- a/Tests/QtAutogen/mocMacroName/Object2Aliased.cpp
+++ b/Tests/QtAutogen/MocMacroName/Object2Aliased.cpp
diff --git a/Tests/QtAutogen/mocMacroName/Object2Aliased.hpp b/Tests/QtAutogen/MocMacroName/Object2Aliased.hpp
index b9bdc12..b9bdc12 100644
--- a/Tests/QtAutogen/mocMacroName/Object2Aliased.hpp
+++ b/Tests/QtAutogen/MocMacroName/Object2Aliased.hpp
diff --git a/Tests/QtAutogen/mocMacroName/main.cpp b/Tests/QtAutogen/MocMacroName/main.cpp
index 3b45d04..3b45d04 100644
--- a/Tests/QtAutogen/mocMacroName/main.cpp
+++ b/Tests/QtAutogen/MocMacroName/main.cpp
diff --git a/Tests/QtAutogen/MocOnly/CMakeLists.txt b/Tests/QtAutogen/MocOnly/CMakeLists.txt
new file mode 100644
index 0000000..33feadf
--- /dev/null
+++ b/Tests/QtAutogen/MocOnly/CMakeLists.txt
@@ -0,0 +1,8 @@
+cmake_minimum_required(VERSION 3.10)
+project(MocOnly)
+include("../AutogenTest.cmake")
+
+# Test different Q_OBJECT position styles
+add_executable(mocOnly StyleA.cpp StyleB.cpp main.cpp)
+set_property(TARGET mocOnly PROPERTY AUTOMOC ON)
+target_link_libraries(mocOnly ${QT_LIBRARIES})
diff --git a/Tests/QtAutogen/mocOnlySource/StyleA.cpp b/Tests/QtAutogen/MocOnly/StyleA.cpp
index ced1dd1..ced1dd1 100644
--- a/Tests/QtAutogen/mocOnlySource/StyleA.cpp
+++ b/Tests/QtAutogen/MocOnly/StyleA.cpp
diff --git a/Tests/QtAutogen/mocOnlySource/StyleA.hpp b/Tests/QtAutogen/MocOnly/StyleA.hpp
index 66735b6..5ba0a87 100644
--- a/Tests/QtAutogen/mocOnlySource/StyleA.hpp
+++ b/Tests/QtAutogen/MocOnly/StyleA.hpp
@@ -3,6 +3,7 @@
#include <QObject>
+/* clang-format off */
/// Q_OBJECT on a single new line
///
class StyleA : public QObject
@@ -11,5 +12,6 @@ class StyleA : public QObject
public:
StyleA();
};
+/* clang-format on */
#endif
diff --git a/Tests/QtAutogen/mocOnlySource/StyleB.cpp b/Tests/QtAutogen/MocOnly/StyleB.cpp
index bec6c1c..bec6c1c 100644
--- a/Tests/QtAutogen/mocOnlySource/StyleB.cpp
+++ b/Tests/QtAutogen/MocOnly/StyleB.cpp
diff --git a/Tests/QtAutogen/mocOnlySource/StyleB.hpp b/Tests/QtAutogen/MocOnly/StyleB.hpp
index 425daf8..86abaa8 100644
--- a/Tests/QtAutogen/mocOnlySource/StyleB.hpp
+++ b/Tests/QtAutogen/MocOnly/StyleB.hpp
@@ -4,7 +4,7 @@
#include <QObject>
/* clang-format off */
-/// Q_OBJECT behind a brace
+/// Q_OBJECT behind a brace on a new line
///
class StyleB : public QObject
{ Q_OBJECT
diff --git a/Tests/QtAutogen/mocOnlySource/main.cpp b/Tests/QtAutogen/MocOnly/main.cpp
index 06f8d81..06f8d81 100644
--- a/Tests/QtAutogen/mocOnlySource/main.cpp
+++ b/Tests/QtAutogen/MocOnly/main.cpp
diff --git a/Tests/QtAutogen/MocOptions/CMakeLists.txt b/Tests/QtAutogen/MocOptions/CMakeLists.txt
new file mode 100644
index 0000000..f64b37b
--- /dev/null
+++ b/Tests/QtAutogen/MocOptions/CMakeLists.txt
@@ -0,0 +1,9 @@
+cmake_minimum_required(VERSION 3.10)
+project(MocOptions)
+include("../AutogenTest.cmake")
+
+# Test extra options passed to moc via AUTOMOC_MOC_OPTIONS
+add_executable(mocOptions Object.cpp main.cpp)
+set_property(TARGET mocOptions PROPERTY AUTOMOC ON)
+set_property(TARGET mocOptions PROPERTY AUTOMOC_MOC_OPTIONS "-nw")
+target_link_libraries(mocOptions ${QT_LIBRARIES})
diff --git a/Tests/QtAutogen/MocOptions/Object.cpp b/Tests/QtAutogen/MocOptions/Object.cpp
new file mode 100644
index 0000000..ad109f1
--- /dev/null
+++ b/Tests/QtAutogen/MocOptions/Object.cpp
@@ -0,0 +1,5 @@
+#include "Object.hpp"
+
+Object::Object()
+{
+}
diff --git a/Tests/QtAutogen/MocOptions/Object.hpp b/Tests/QtAutogen/MocOptions/Object.hpp
new file mode 100644
index 0000000..e7a6142
--- /dev/null
+++ b/Tests/QtAutogen/MocOptions/Object.hpp
@@ -0,0 +1,13 @@
+#ifndef Object_HPP
+#define Object_HPP
+
+#include <QObject>
+
+class Object : public QObject
+{
+ Q_OBJECT
+public:
+ Object();
+};
+
+#endif
diff --git a/Tests/QtAutogen/MocOptions/main.cpp b/Tests/QtAutogen/MocOptions/main.cpp
new file mode 100644
index 0000000..7aeab1a
--- /dev/null
+++ b/Tests/QtAutogen/MocOptions/main.cpp
@@ -0,0 +1,7 @@
+#include "Object.hpp"
+
+int main(int argv, char** args)
+{
+ Object object;
+ return 0;
+}
diff --git a/Tests/QtAutogen/MocSkipSource/CMakeLists.txt b/Tests/QtAutogen/MocSkipSource/CMakeLists.txt
new file mode 100644
index 0000000..8d1fa6a
--- /dev/null
+++ b/Tests/QtAutogen/MocSkipSource/CMakeLists.txt
@@ -0,0 +1,36 @@
+cmake_minimum_required(VERSION 3.10)
+project(MocSkipSource)
+include("../AutogenTest.cmake")
+
+# Test for SKIP_AUTOMOC and SKIP_AUTOGEN on an AUTOMOC enabled target
+
+# Generate header mocs manually
+qtx_wrap_cpp(skipMocWrapMoc
+ qItemA.hpp
+ qItemB.hpp
+ qItemC.hpp
+ qItemD.hpp
+)
+set(skipMocSources
+ skipMoc.cpp
+ qItemA.cpp
+ qItemB.cpp
+ qItemC.cpp
+ qItemD.cpp
+)
+# When cpp files are skipped, the hpp won't be processed either,
+# unless they are mentioned in the sources - which they aren't.
+set_property(SOURCE qItemA.cpp PROPERTY SKIP_AUTOMOC ON)
+set_property(SOURCE qItemB.cpp PROPERTY SKIP_AUTOGEN ON)
+# When hpp files are skipped, the cpp still get processed.
+set_property(SOURCE qItemC.hpp PROPERTY SKIP_AUTOMOC ON)
+set_property(SOURCE qItemD.hpp PROPERTY SKIP_AUTOGEN ON)
+# AUTOMOC enabled only
+add_executable(skipMocA ${skipMocSources} ${skipMocWrapMoc})
+set_property(TARGET skipMocA PROPERTY AUTOMOC ON)
+target_link_libraries(skipMocA ${QT_LIBRARIES})
+# AUTOMOC and AUTOUIC enabled
+add_executable(skipMocB ${skipMocSources} ${skipMocWrapMoc})
+set_property(TARGET skipMocB PROPERTY AUTOMOC ON)
+set_property(TARGET skipMocB PROPERTY AUTOUIC ON)
+target_link_libraries(skipMocB ${QT_LIBRARIES})
diff --git a/Tests/QtAutogen/skipSource/qItemA.cpp b/Tests/QtAutogen/MocSkipSource/qItemA.cpp
index 522c2c7..522c2c7 100644
--- a/Tests/QtAutogen/skipSource/qItemA.cpp
+++ b/Tests/QtAutogen/MocSkipSource/qItemA.cpp
diff --git a/Tests/QtAutogen/skipSource/qItemA.hpp b/Tests/QtAutogen/MocSkipSource/qItemA.hpp
index d295faf..d295faf 100644
--- a/Tests/QtAutogen/skipSource/qItemA.hpp
+++ b/Tests/QtAutogen/MocSkipSource/qItemA.hpp
diff --git a/Tests/QtAutogen/skipSource/qItemB.cpp b/Tests/QtAutogen/MocSkipSource/qItemB.cpp
index 636e15d..636e15d 100644
--- a/Tests/QtAutogen/skipSource/qItemB.cpp
+++ b/Tests/QtAutogen/MocSkipSource/qItemB.cpp
diff --git a/Tests/QtAutogen/skipSource/qItemB.hpp b/Tests/QtAutogen/MocSkipSource/qItemB.hpp
index 1775915..1775915 100644
--- a/Tests/QtAutogen/skipSource/qItemB.hpp
+++ b/Tests/QtAutogen/MocSkipSource/qItemB.hpp
diff --git a/Tests/QtAutogen/skipSource/qItemC.cpp b/Tests/QtAutogen/MocSkipSource/qItemC.cpp
index 622f282..622f282 100644
--- a/Tests/QtAutogen/skipSource/qItemC.cpp
+++ b/Tests/QtAutogen/MocSkipSource/qItemC.cpp
diff --git a/Tests/QtAutogen/skipSource/qItemC.hpp b/Tests/QtAutogen/MocSkipSource/qItemC.hpp
index f06bda2..f06bda2 100644
--- a/Tests/QtAutogen/skipSource/qItemC.hpp
+++ b/Tests/QtAutogen/MocSkipSource/qItemC.hpp
diff --git a/Tests/QtAutogen/skipSource/qItemD.cpp b/Tests/QtAutogen/MocSkipSource/qItemD.cpp
index fe0f4e4..fe0f4e4 100644
--- a/Tests/QtAutogen/skipSource/qItemD.cpp
+++ b/Tests/QtAutogen/MocSkipSource/qItemD.cpp
diff --git a/Tests/QtAutogen/skipSource/qItemD.hpp b/Tests/QtAutogen/MocSkipSource/qItemD.hpp
index 99e0acb..99e0acb 100644
--- a/Tests/QtAutogen/skipSource/qItemD.hpp
+++ b/Tests/QtAutogen/MocSkipSource/qItemD.hpp
diff --git a/Tests/QtAutogen/skipMoc.cpp b/Tests/QtAutogen/MocSkipSource/skipMoc.cpp
index d6b292f..c915334 100644
--- a/Tests/QtAutogen/skipMoc.cpp
+++ b/Tests/QtAutogen/MocSkipSource/skipMoc.cpp
@@ -1,8 +1,8 @@
-#include "skipSource/qItemA.hpp"
-#include "skipSource/qItemB.hpp"
-#include "skipSource/qItemC.hpp"
-#include "skipSource/qItemD.hpp"
+#include "qItemA.hpp"
+#include "qItemB.hpp"
+#include "qItemC.hpp"
+#include "qItemD.hpp"
int main(int, char**)
{
diff --git a/Tests/QtAutogen/objectLibrary/CMakeLists.txt b/Tests/QtAutogen/ObjectLibrary/CMakeLists.txt
index 9b29a40..088a24c 100644
--- a/Tests/QtAutogen/objectLibrary/CMakeLists.txt
+++ b/Tests/QtAutogen/ObjectLibrary/CMakeLists.txt
@@ -1,3 +1,7 @@
+cmake_minimum_required(VERSION 3.10)
+project(ObjectLibrary)
+include("../AutogenTest.cmake")
+
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
diff --git a/Tests/QtAutogen/objectLibrary/a/CMakeLists.txt b/Tests/QtAutogen/ObjectLibrary/a/CMakeLists.txt
index fe76ac3..fe76ac3 100644
--- a/Tests/QtAutogen/objectLibrary/a/CMakeLists.txt
+++ b/Tests/QtAutogen/ObjectLibrary/a/CMakeLists.txt
diff --git a/Tests/QtAutogen/objectLibrary/a/classa.cpp b/Tests/QtAutogen/ObjectLibrary/a/classa.cpp
index 4f08fda..4f08fda 100644
--- a/Tests/QtAutogen/objectLibrary/a/classa.cpp
+++ b/Tests/QtAutogen/ObjectLibrary/a/classa.cpp
diff --git a/Tests/QtAutogen/objectLibrary/a/classa.h b/Tests/QtAutogen/ObjectLibrary/a/classa.h
index fa5fed9..fa5fed9 100644
--- a/Tests/QtAutogen/objectLibrary/a/classa.h
+++ b/Tests/QtAutogen/ObjectLibrary/a/classa.h
diff --git a/Tests/QtAutogen/objectLibrary/b/classb.cpp b/Tests/QtAutogen/ObjectLibrary/b/classb.cpp
index 26e0926..26e0926 100644
--- a/Tests/QtAutogen/objectLibrary/b/classb.cpp
+++ b/Tests/QtAutogen/ObjectLibrary/b/classb.cpp
diff --git a/Tests/QtAutogen/objectLibrary/b/classb.h b/Tests/QtAutogen/ObjectLibrary/b/classb.h
index 783bb48..783bb48 100644
--- a/Tests/QtAutogen/objectLibrary/b/classb.h
+++ b/Tests/QtAutogen/ObjectLibrary/b/classb.h
diff --git a/Tests/QtAutogen/objectLibrary/main.cpp b/Tests/QtAutogen/ObjectLibrary/main.cpp
index cacf0fd..cacf0fd 100644
--- a/Tests/QtAutogen/objectLibrary/main.cpp
+++ b/Tests/QtAutogen/ObjectLibrary/main.cpp
diff --git a/Tests/QtAutogen/RccEmpty/CMakeLists.txt b/Tests/QtAutogen/RccEmpty/CMakeLists.txt
new file mode 100644
index 0000000..3b16edc
--- /dev/null
+++ b/Tests/QtAutogen/RccEmpty/CMakeLists.txt
@@ -0,0 +1,8 @@
+cmake_minimum_required(VERSION 3.10)
+project(RccEmpty)
+include("../AutogenTest.cmake")
+
+# Test AUTORCC on a .qrc file with no resource files
+add_executable(rccEmpty rccEmpty.cpp rccEmptyRes.qrc)
+set_property(TARGET rccEmpty PROPERTY AUTORCC ON)
+target_link_libraries(rccEmpty ${QT_QTCORE_TARGET})
diff --git a/Tests/QtAutogen/rccEmpty.cpp b/Tests/QtAutogen/RccEmpty/rccEmpty.cpp
index 7f2c527..7f2c527 100644
--- a/Tests/QtAutogen/rccEmpty.cpp
+++ b/Tests/QtAutogen/RccEmpty/rccEmpty.cpp
diff --git a/Tests/QtAutogen/rccEmptyRes.qrc b/Tests/QtAutogen/RccEmpty/rccEmptyRes.qrc
index 4ca9cd5..4ca9cd5 100644
--- a/Tests/QtAutogen/rccEmptyRes.qrc
+++ b/Tests/QtAutogen/RccEmpty/rccEmptyRes.qrc
diff --git a/Tests/QtAutogen/RccOffMocLibrary/CMakeLists.txt b/Tests/QtAutogen/RccOffMocLibrary/CMakeLists.txt
new file mode 100644
index 0000000..7f7432e
--- /dev/null
+++ b/Tests/QtAutogen/RccOffMocLibrary/CMakeLists.txt
@@ -0,0 +1,17 @@
+cmake_minimum_required(VERSION 3.10)
+project(RccOffMocLibrary)
+include("../AutogenTest.cmake")
+
+# Add not_generated_file.qrc to the source list to get the file-level
+# dependency, but don't generate a c++ file from it. Disable the AUTORCC
+# feature for this target. This tests that qrc files in the sources don't
+# have an effect on generation if AUTORCC is off.
+add_library(empty STATIC empty.cpp not_generated_file.qrc)
+set_target_properties(empty PROPERTIES AUTORCC OFF)
+set_target_properties(empty PROPERTIES AUTOMOC TRUE)
+target_link_libraries(empty no_link_language)
+add_library(no_link_language STATIC empty.h)
+set_target_properties(no_link_language PROPERTIES AUTOMOC TRUE)
+# Pass Qt compiler features to targets that don't link against Qt
+target_compile_features(no_link_language PRIVATE ${QT_COMPILE_FEATURES})
+target_compile_features(empty PRIVATE ${QT_COMPILE_FEATURES})
diff --git a/Tests/QtAutogen/empty.cpp b/Tests/QtAutogen/RccOffMocLibrary/empty.cpp
index ab32cf6..ab32cf6 100644
--- a/Tests/QtAutogen/empty.cpp
+++ b/Tests/QtAutogen/RccOffMocLibrary/empty.cpp
diff --git a/Tests/QtAutogen/empty.h b/Tests/QtAutogen/RccOffMocLibrary/empty.h
index 6bdd2ac..6bdd2ac 100644
--- a/Tests/QtAutogen/empty.h
+++ b/Tests/QtAutogen/RccOffMocLibrary/empty.h
diff --git a/Tests/QtAutogen/not_generated_file.qrc b/Tests/QtAutogen/RccOffMocLibrary/not_generated_file.qrc
index c769834..c769834 100644
--- a/Tests/QtAutogen/not_generated_file.qrc
+++ b/Tests/QtAutogen/RccOffMocLibrary/not_generated_file.qrc
diff --git a/Tests/QtAutogen/RccOnly/CMakeLists.txt b/Tests/QtAutogen/RccOnly/CMakeLists.txt
new file mode 100644
index 0000000..a65dee4
--- /dev/null
+++ b/Tests/QtAutogen/RccOnly/CMakeLists.txt
@@ -0,0 +1,8 @@
+cmake_minimum_required(VERSION 3.10)
+project(RccOnly)
+include("../AutogenTest.cmake")
+
+# Test AUTORCC being enabled only
+add_executable(rccOnly rccOnly.cpp rccOnlyRes.qrc)
+set_property(TARGET rccOnly PROPERTY AUTORCC ON)
+target_link_libraries(rccOnly ${QT_QTCORE_TARGET})
diff --git a/Tests/QtAutogen/rccOnly.cpp b/Tests/QtAutogen/RccOnly/rccOnly.cpp
index 61c7bf4..61c7bf4 100644
--- a/Tests/QtAutogen/rccOnly.cpp
+++ b/Tests/QtAutogen/RccOnly/rccOnly.cpp
diff --git a/Tests/QtAutogen/rccOnlyRes.qrc b/Tests/QtAutogen/RccOnly/rccOnlyRes.qrc
index 5551348..5551348 100644
--- a/Tests/QtAutogen/rccOnlyRes.qrc
+++ b/Tests/QtAutogen/RccOnly/rccOnlyRes.qrc
diff --git a/Tests/QtAutogen/RccSkipSource/CMakeLists.txt b/Tests/QtAutogen/RccSkipSource/CMakeLists.txt
new file mode 100644
index 0000000..f8a8032
--- /dev/null
+++ b/Tests/QtAutogen/RccSkipSource/CMakeLists.txt
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 3.10)
+project(RccSkipSource)
+include("../AutogenTest.cmake")
+
+# Test for SKIP_AUTORCC and SKIP_AUTOGEN on an AUTORCC enabled target
+set(skipRccSources
+ skipRcc.cpp
+ skipRccBad1.qrc
+ skipRccBad2.qrc
+ skipRccGood.qrc
+)
+set_property(SOURCE skipRccBad1.qrc PROPERTY SKIP_AUTORCC ON)
+set_property(SOURCE skipRccBad2.qrc PROPERTY SKIP_AUTOGEN ON)
+# AUTORCC enabled
+add_executable(skipRccA ${skipRccSources})
+set_property(TARGET skipRccA PROPERTY AUTORCC ON)
+target_link_libraries(skipRccA ${QT_LIBRARIES})
+# AUTORCC, AUTOUIC and AUTOMOC enabled
+add_executable(skipRccB ${skipRccSources})
+set_property(TARGET skipRccB PROPERTY AUTORCC ON)
+set_property(TARGET skipRccB PROPERTY AUTOUIC ON)
+set_property(TARGET skipRccB PROPERTY AUTOMOC ON)
+target_link_libraries(skipRccB ${QT_LIBRARIES})
diff --git a/Tests/QtAutogen/skipRcc.cpp b/Tests/QtAutogen/RccSkipSource/skipRcc.cpp
index ec57110..ec57110 100644
--- a/Tests/QtAutogen/skipRcc.cpp
+++ b/Tests/QtAutogen/RccSkipSource/skipRcc.cpp
diff --git a/Tests/QtAutogen/skipSource/skipRccBad1.qrc b/Tests/QtAutogen/RccSkipSource/skipRccBad1.qrc
index 6cbd9ed..6cbd9ed 100644
--- a/Tests/QtAutogen/skipSource/skipRccBad1.qrc
+++ b/Tests/QtAutogen/RccSkipSource/skipRccBad1.qrc
diff --git a/Tests/QtAutogen/skipSource/skipRccBad2.qrc b/Tests/QtAutogen/RccSkipSource/skipRccBad2.qrc
index b32c589..b32c589 100644
--- a/Tests/QtAutogen/skipSource/skipRccBad2.qrc
+++ b/Tests/QtAutogen/RccSkipSource/skipRccBad2.qrc
diff --git a/Tests/QtAutogen/skipSource/skipRccGood.qrc b/Tests/QtAutogen/RccSkipSource/skipRccGood.qrc
index 21a94b0..21a94b0 100644
--- a/Tests/QtAutogen/skipSource/skipRccGood.qrc
+++ b/Tests/QtAutogen/RccSkipSource/skipRccGood.qrc
diff --git a/Tests/QtAutogen/RerunMocBasic/CMakeLists.txt b/Tests/QtAutogen/RerunMocBasic/CMakeLists.txt
new file mode 100644
index 0000000..0bb0339
--- /dev/null
+++ b/Tests/QtAutogen/RerunMocBasic/CMakeLists.txt
@@ -0,0 +1,65 @@
+cmake_minimum_required(VERSION 3.10)
+project(RerunMocBasic)
+include("../AutogenTest.cmake")
+
+# Dummy executable to generate a clean target
+add_executable(dummy dummy.cpp)
+
+set(timeformat "%Y%j%H%M%S")
+set(mocBasicSrcDir "${CMAKE_CURRENT_SOURCE_DIR}/MocBasic")
+set(mocBasicBinDir "${CMAKE_CURRENT_BINARY_DIR}/MocBasic")
+
+# Initial build
+configure_file("${mocBasicSrcDir}/test1a.h.in" "${mocBasicBinDir}/test1.h" COPYONLY)
+try_compile(MOC_RERUN
+ "${mocBasicBinDir}"
+ "${mocBasicSrcDir}"
+ MocBasic
+ CMAKE_FLAGS "-DQT_TEST_VERSION=${QT_TEST_VERSION}"
+ "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}"
+ OUTPUT_VARIABLE output
+)
+if (NOT MOC_RERUN)
+ message(SEND_ERROR "Initial build of mocBasic failed. Output: ${output}")
+endif()
+# Get name of the output binary
+file(STRINGS "${mocBasicBinDir}/mocBasic.txt" mocBasicList ENCODING UTF-8)
+list(GET mocBasicList 0 mocBasicBin)
+
+message("Changing the header content for a MOC rerun")
+# - Acquire binary timestamps before the build
+file(TIMESTAMP "${mocBasicBin}" timeBefore "${timeformat}")
+# - Ensure that the timestamp will change
+# - Change header file content and rebuild
+# - Rebuild
+execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1)
+configure_file("${mocBasicSrcDir}/test1b.h.in" "${mocBasicBinDir}/test1.h" COPYONLY)
+execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${mocBasicBinDir}" RESULT_VARIABLE result )
+if (result)
+ message(SEND_ERROR "Second build of mocBasic failed.")
+endif()
+# - Acquire binary timestamps after the build
+file(TIMESTAMP "${mocBasicBin}" timeAfter "${timeformat}")
+# - Test if timestamps changed
+if (NOT timeAfter GREATER timeBefore)
+ message(SEND_ERROR "File (${mocBasicBin}) should have changed!")
+endif()
+
+
+message("Changing nothing for a MOC rerun")
+# - Acquire binary timestamps before the build
+file(TIMESTAMP "${mocBasicBin}" timeBefore "${timeformat}")
+# - Ensure that the timestamp would change
+# - Change nothing
+# - Rebuild
+execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1)
+execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${mocBasicBinDir}" RESULT_VARIABLE result )
+if (result)
+ message(SEND_ERROR "Third build of mocBasic failed.")
+endif()
+# - Acquire binary timestamps after the build
+file(TIMESTAMP "${mocBasicBin}" timeAfter "${timeformat}")
+# - Test if timestamps changed
+if (timeAfter GREATER timeBefore)
+ message(SEND_ERROR "File (${mocBasicBin}) should not have changed!")
+endif()
diff --git a/Tests/QtAutogen/RerunMocBasic/MocBasic/CMakeLists.txt b/Tests/QtAutogen/RerunMocBasic/MocBasic/CMakeLists.txt
new file mode 100644
index 0000000..cec60a4
--- /dev/null
+++ b/Tests/QtAutogen/RerunMocBasic/MocBasic/CMakeLists.txt
@@ -0,0 +1,24 @@
+cmake_minimum_required(VERSION 3.10)
+project(MocBasic)
+include("../../AutogenTest.cmake")
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+
+# Generated source file
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/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(mocBasic
+ ${CMAKE_CURRENT_BINARY_DIR}/test1.h
+ ${CMAKE_CURRENT_BINARY_DIR}/main.cpp
+ res1.qrc
+)
+target_include_directories(mocBasic PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
+target_link_libraries(mocBasic ${QT_QTCORE_TARGET})
+# Write target name to text file
+add_custom_command(TARGET mocBasic POST_BUILD COMMAND
+ ${CMAKE_COMMAND} -E echo "$<TARGET_FILE:mocBasic>" > mocBasic.txt
+)
diff --git a/Tests/QtAutogenRerun/mocRerun/input.txt b/Tests/QtAutogen/RerunMocBasic/MocBasic/input.txt
index da62762..da62762 100644
--- a/Tests/QtAutogenRerun/mocRerun/input.txt
+++ b/Tests/QtAutogen/RerunMocBasic/MocBasic/input.txt
diff --git a/Tests/QtAutogenRerun/mocRerun/main.cpp.in b/Tests/QtAutogen/RerunMocBasic/MocBasic/main.cpp.in
index b37ff61..9d7ea37 100644
--- a/Tests/QtAutogenRerun/mocRerun/main.cpp.in
+++ b/Tests/QtAutogen/RerunMocBasic/MocBasic/main.cpp.in
@@ -1,5 +1,7 @@
#include "test1.h"
+extern int qInitResources_res1();
+
class Test2 : public QObject
{
Q_OBJECT
@@ -9,6 +11,9 @@ public slots:
int main()
{
+ // Fails to link if the rcc generated symbol is not present.
+ qInitResources_res1();
+
Test1 test1;
Test2 test2;
diff --git a/Tests/QtAutogenRerun/mocRerun/res1.qrc b/Tests/QtAutogen/RerunMocBasic/MocBasic/res1.qrc
index fb804b5..fb804b5 100644
--- a/Tests/QtAutogenRerun/mocRerun/res1.qrc
+++ b/Tests/QtAutogen/RerunMocBasic/MocBasic/res1.qrc
diff --git a/Tests/QtAutogenRerun/mocRerun/test1a.h.in b/Tests/QtAutogen/RerunMocBasic/MocBasic/test1a.h.in
index a335046..a335046 100644
--- a/Tests/QtAutogenRerun/mocRerun/test1a.h.in
+++ b/Tests/QtAutogen/RerunMocBasic/MocBasic/test1a.h.in
diff --git a/Tests/QtAutogenRerun/mocRerun/test1b.h.in b/Tests/QtAutogen/RerunMocBasic/MocBasic/test1b.h.in
index 6128eeb..6128eeb 100644
--- a/Tests/QtAutogenRerun/mocRerun/test1b.h.in
+++ b/Tests/QtAutogen/RerunMocBasic/MocBasic/test1b.h.in
diff --git a/Tests/QtAutogenRerun/dummy.cpp b/Tests/QtAutogen/RerunMocBasic/dummy.cpp
index 4837a76..4837a76 100644
--- a/Tests/QtAutogenRerun/dummy.cpp
+++ b/Tests/QtAutogen/RerunMocBasic/dummy.cpp
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/rccDepends.cmake b/Tests/QtAutogen/RerunRccDepends/CMakeLists.txt
index 68e1482..2e6a5bd 100644
--- a/Tests/QtAutogenRerun/rccDepends.cmake
+++ b/Tests/QtAutogen/RerunRccDepends/CMakeLists.txt
@@ -1,8 +1,17 @@
+cmake_minimum_required(VERSION 3.10)
+project(RerunRccDepends)
+include("../AutogenTest.cmake")
+
+# Tests rcc rebuilding when a resource file changes
+
+# Dummy executable to generate a clean target
+add_executable(dummy dummy.cpp)
+
# When a .qrc or a file listed in a .qrc file changes,
# the target must be rebuilt
set(timeformat "%Y%j%H%M%S")
-set(rccDepSD "${CMAKE_CURRENT_SOURCE_DIR}/rccDepends")
-set(rccDepBD "${CMAKE_CURRENT_BINARY_DIR}/rccDepends")
+set(rccDepSD "${CMAKE_CURRENT_SOURCE_DIR}/RccDepends")
+set(rccDepBD "${CMAKE_CURRENT_BINARY_DIR}/RccDepends")
# Initial build
configure_file(${rccDepSD}/resPlainA.qrc.in ${rccDepBD}/resPlain.qrc COPYONLY)
@@ -10,10 +19,9 @@ configure_file(${rccDepSD}/resGenA.qrc.in ${rccDepBD}/resGen.qrc.in COPYONLY)
try_compile(RCC_DEPENDS
"${rccDepBD}"
"${rccDepSD}"
- rccDepends
- CMAKE_FLAGS "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}"
- "-DQT_TEST_VERSION=${QT_TEST_VERSION}"
- "-DCMAKE_PREFIX_PATH=${Qt_PREFIX_DIR}"
+ RccDepends
+ CMAKE_FLAGS "-DQT_TEST_VERSION=${QT_TEST_VERSION}"
+ "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}"
OUTPUT_VARIABLE output
)
if (NOT RCC_DEPENDS)
diff --git a/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt b/Tests/QtAutogen/RerunRccDepends/RccDepends/CMakeLists.txt
index 291592e..0507e61 100644
--- a/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt
+++ b/Tests/QtAutogen/RerunRccDepends/RccDepends/CMakeLists.txt
@@ -1,17 +1,6 @@
-cmake_minimum_required(VERSION 3.9)
-project(rccDepends 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(RccDepends)
+include("../../AutogenTest.cmake")
# Enable AUTORCC for all targets
set(CMAKE_AUTORCC ON)
@@ -23,19 +12,22 @@ configure_file(resGen/input.txt.in resGen/input.txt COPYONLY)
configure_file(resGen/input.txt.in resGen/inputAdded.txt COPYONLY)
# Generated qrc file with dependency
-add_custom_command(OUTPUT resGen.qrc
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc.in
COMMAND ${CMAKE_COMMAND} -E sleep 2
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc)
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc
+)
# Target that uses a plain .qrc file
add_executable(rccDependsPlain main.cpp ${CMAKE_CURRENT_BINARY_DIR}/resPlain.qrc)
-target_link_libraries(rccDependsPlain ${QT_CORE_TARGET})
+target_link_libraries(rccDependsPlain ${QT_QTCORE_TARGET})
add_custom_command(TARGET rccDependsPlain POST_BUILD COMMAND
- ${CMAKE_COMMAND} -E echo "$<TARGET_FILE:rccDependsPlain>" > targetPlain.txt)
+ ${CMAKE_COMMAND} -E echo "$<TARGET_FILE:rccDependsPlain>" > targetPlain.txt
+)
# Target that uses a GENERATED .qrc file
add_executable(rccDependsGen main.cpp ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc )
-target_link_libraries(rccDependsGen ${QT_CORE_TARGET})
+target_link_libraries(rccDependsGen ${QT_QTCORE_TARGET})
add_custom_command(TARGET rccDependsGen POST_BUILD COMMAND
- ${CMAKE_COMMAND} -E echo "$<TARGET_FILE:rccDependsGen>" > targetGen.txt)
+ ${CMAKE_COMMAND} -E echo "$<TARGET_FILE:rccDependsGen>" > targetGen.txt
+)
diff --git a/Tests/QtAutogenRerun/rccDepends/main.cpp b/Tests/QtAutogen/RerunRccDepends/RccDepends/main.cpp
index 766b775..766b775 100644
--- a/Tests/QtAutogenRerun/rccDepends/main.cpp
+++ b/Tests/QtAutogen/RerunRccDepends/RccDepends/main.cpp
diff --git a/Tests/QtAutogenRerun/rccDepends/resGen/input.txt.in b/Tests/QtAutogen/RerunRccDepends/RccDepends/resGen/input.txt.in
index 4f24589..4f24589 100644
--- a/Tests/QtAutogenRerun/rccDepends/resGen/input.txt.in
+++ b/Tests/QtAutogen/RerunRccDepends/RccDepends/resGen/input.txt.in
diff --git a/Tests/QtAutogenRerun/rccDepends/resGen/inputAdded.txt.in b/Tests/QtAutogen/RerunRccDepends/RccDepends/resGen/inputAdded.txt.in
index 4f24589..4f24589 100644
--- a/Tests/QtAutogenRerun/rccDepends/resGen/inputAdded.txt.in
+++ b/Tests/QtAutogen/RerunRccDepends/RccDepends/resGen/inputAdded.txt.in
diff --git a/Tests/QtAutogenRerun/rccDepends/resGenA.qrc.in b/Tests/QtAutogen/RerunRccDepends/RccDepends/resGenA.qrc.in
index c131a34..c131a34 100644
--- a/Tests/QtAutogenRerun/rccDepends/resGenA.qrc.in
+++ b/Tests/QtAutogen/RerunRccDepends/RccDepends/resGenA.qrc.in
diff --git a/Tests/QtAutogenRerun/rccDepends/resGenB.qrc.in b/Tests/QtAutogen/RerunRccDepends/RccDepends/resGenB.qrc.in
index 8c7e643..8c7e643 100644
--- a/Tests/QtAutogenRerun/rccDepends/resGenB.qrc.in
+++ b/Tests/QtAutogen/RerunRccDepends/RccDepends/resGenB.qrc.in
diff --git a/Tests/QtAutogenRerun/rccDepends/resPlain/input.txt.in b/Tests/QtAutogen/RerunRccDepends/RccDepends/resPlain/input.txt.in
index a5e407a..a5e407a 100644
--- a/Tests/QtAutogenRerun/rccDepends/resPlain/input.txt.in
+++ b/Tests/QtAutogen/RerunRccDepends/RccDepends/resPlain/input.txt.in
diff --git a/Tests/QtAutogenRerun/rccDepends/resPlain/inputAdded.txt.in b/Tests/QtAutogen/RerunRccDepends/RccDepends/resPlain/inputAdded.txt.in
index a5e407a..a5e407a 100644
--- a/Tests/QtAutogenRerun/rccDepends/resPlain/inputAdded.txt.in
+++ b/Tests/QtAutogen/RerunRccDepends/RccDepends/resPlain/inputAdded.txt.in
diff --git a/Tests/QtAutogenRerun/rccDepends/resPlainA.qrc.in b/Tests/QtAutogen/RerunRccDepends/RccDepends/resPlainA.qrc.in
index c135d85..c135d85 100644
--- a/Tests/QtAutogenRerun/rccDepends/resPlainA.qrc.in
+++ b/Tests/QtAutogen/RerunRccDepends/RccDepends/resPlainA.qrc.in
diff --git a/Tests/QtAutogenRerun/rccDepends/resPlainB.qrc.in b/Tests/QtAutogen/RerunRccDepends/RccDepends/resPlainB.qrc.in
index 186b653..186b653 100644
--- a/Tests/QtAutogenRerun/rccDepends/resPlainB.qrc.in
+++ b/Tests/QtAutogen/RerunRccDepends/RccDepends/resPlainB.qrc.in
diff --git a/Tests/QtAutogen/RerunRccDepends/dummy.cpp b/Tests/QtAutogen/RerunRccDepends/dummy.cpp
new file mode 100644
index 0000000..4837a76
--- /dev/null
+++ b/Tests/QtAutogen/RerunRccDepends/dummy.cpp
@@ -0,0 +1,5 @@
+
+int main(int argv, char** args)
+{
+ return 0;
+}
diff --git a/Tests/QtAutogen/sameName/CMakeLists.txt b/Tests/QtAutogen/SameName/CMakeLists.txt
index f695875..c7d6e52 100644
--- a/Tests/QtAutogen/sameName/CMakeLists.txt
+++ b/Tests/QtAutogen/SameName/CMakeLists.txt
@@ -1,3 +1,7 @@
+cmake_minimum_required(VERSION 3.10)
+project(SameName)
+include("../AutogenTest.cmake")
+
# Test AUTOMOC and AUTORCC on source files with the same name
# but in different subdirectories
@@ -20,7 +24,8 @@ target_link_libraries(sameName ${QT_LIBRARIES})
set_target_properties(sameName PROPERTIES
AUTOMOC TRUE
AUTOUIC TRUE
- AUTORCC TRUE)
+ AUTORCC TRUE
+)
# Set different compression levels
if (QT_TEST_VERSION STREQUAL 4)
diff --git a/Tests/QtAutogen/sameName/aaa/bbb/data.qrc b/Tests/QtAutogen/SameName/aaa/bbb/data.qrc
index 0ea3537..0ea3537 100644
--- a/Tests/QtAutogen/sameName/aaa/bbb/data.qrc
+++ b/Tests/QtAutogen/SameName/aaa/bbb/data.qrc
diff --git a/Tests/QtAutogen/sameName/aaa/bbb/item.cpp b/Tests/QtAutogen/SameName/aaa/bbb/item.cpp
index 850206f..850206f 100644
--- a/Tests/QtAutogen/sameName/aaa/bbb/item.cpp
+++ b/Tests/QtAutogen/SameName/aaa/bbb/item.cpp
diff --git a/Tests/QtAutogen/sameName/aaa/bbb/item.hpp b/Tests/QtAutogen/SameName/aaa/bbb/item.hpp
index 0855043..0855043 100644
--- a/Tests/QtAutogen/sameName/aaa/bbb/item.hpp
+++ b/Tests/QtAutogen/SameName/aaa/bbb/item.hpp
diff --git a/Tests/QtAutogen/sameName/aaa/data.qrc b/Tests/QtAutogen/SameName/aaa/data.qrc
index 379af60..379af60 100644
--- a/Tests/QtAutogen/sameName/aaa/data.qrc
+++ b/Tests/QtAutogen/SameName/aaa/data.qrc
diff --git a/Tests/QtAutogen/sameName/aaa/item.cpp b/Tests/QtAutogen/SameName/aaa/item.cpp
index e35d3d1..e35d3d1 100644
--- a/Tests/QtAutogen/sameName/aaa/item.cpp
+++ b/Tests/QtAutogen/SameName/aaa/item.cpp
diff --git a/Tests/QtAutogen/sameName/aaa/item.hpp b/Tests/QtAutogen/SameName/aaa/item.hpp
index 875f72f..875f72f 100644
--- a/Tests/QtAutogen/sameName/aaa/item.hpp
+++ b/Tests/QtAutogen/SameName/aaa/item.hpp
diff --git a/Tests/QtAutogen/sameName/aaa/view.ui b/Tests/QtAutogen/SameName/aaa/view.ui
index 0f09980..0f09980 100644
--- a/Tests/QtAutogen/sameName/aaa/view.ui
+++ b/Tests/QtAutogen/SameName/aaa/view.ui
diff --git a/Tests/QtAutogen/sameName/bbb/aaa/data.qrc b/Tests/QtAutogen/SameName/bbb/aaa/data.qrc
index da98009..da98009 100644
--- a/Tests/QtAutogen/sameName/bbb/aaa/data.qrc
+++ b/Tests/QtAutogen/SameName/bbb/aaa/data.qrc
diff --git a/Tests/QtAutogen/sameName/bbb/aaa/item.cpp b/Tests/QtAutogen/SameName/bbb/aaa/item.cpp
index 7ad01c3..7ad01c3 100644
--- a/Tests/QtAutogen/sameName/bbb/aaa/item.cpp
+++ b/Tests/QtAutogen/SameName/bbb/aaa/item.cpp
diff --git a/Tests/QtAutogen/sameName/bbb/aaa/item.hpp b/Tests/QtAutogen/SameName/bbb/aaa/item.hpp
index be07ca8..be07ca8 100644
--- a/Tests/QtAutogen/sameName/bbb/aaa/item.hpp
+++ b/Tests/QtAutogen/SameName/bbb/aaa/item.hpp
diff --git a/Tests/QtAutogen/sameName/bbb/data.qrc b/Tests/QtAutogen/SameName/bbb/data.qrc
index 5b080f5..5b080f5 100644
--- a/Tests/QtAutogen/sameName/bbb/data.qrc
+++ b/Tests/QtAutogen/SameName/bbb/data.qrc
diff --git a/Tests/QtAutogen/sameName/bbb/item.cpp b/Tests/QtAutogen/SameName/bbb/item.cpp
index 9ef128e..9ef128e 100644
--- a/Tests/QtAutogen/sameName/bbb/item.cpp
+++ b/Tests/QtAutogen/SameName/bbb/item.cpp
diff --git a/Tests/QtAutogen/sameName/bbb/item.hpp b/Tests/QtAutogen/SameName/bbb/item.hpp
index d39a9d7..d39a9d7 100644
--- a/Tests/QtAutogen/sameName/bbb/item.hpp
+++ b/Tests/QtAutogen/SameName/bbb/item.hpp
diff --git a/Tests/QtAutogen/sameName/bbb/view.ui b/Tests/QtAutogen/SameName/bbb/view.ui
index a8f506e..a8f506e 100644
--- a/Tests/QtAutogen/sameName/bbb/view.ui
+++ b/Tests/QtAutogen/SameName/bbb/view.ui
diff --git a/Tests/QtAutogen/sameName/ccc/data.qrc b/Tests/QtAutogen/SameName/ccc/data.qrc
index f934c39..f934c39 100644
--- a/Tests/QtAutogen/sameName/ccc/data.qrc
+++ b/Tests/QtAutogen/SameName/ccc/data.qrc
diff --git a/Tests/QtAutogen/sameName/ccc/item.cpp b/Tests/QtAutogen/SameName/ccc/item.cpp
index ab8a281..ab8a281 100644
--- a/Tests/QtAutogen/sameName/ccc/item.cpp
+++ b/Tests/QtAutogen/SameName/ccc/item.cpp
diff --git a/Tests/QtAutogen/sameName/ccc/item.hpp b/Tests/QtAutogen/SameName/ccc/item.hpp
index 20d9dd9..20d9dd9 100644
--- a/Tests/QtAutogen/sameName/ccc/item.hpp
+++ b/Tests/QtAutogen/SameName/ccc/item.hpp
diff --git a/Tests/QtAutogen/sameName/ccc/view.ui b/Tests/QtAutogen/SameName/ccc/view.ui
index 7989c69..7989c69 100644
--- a/Tests/QtAutogen/sameName/ccc/view.ui
+++ b/Tests/QtAutogen/SameName/ccc/view.ui
diff --git a/Tests/QtAutogen/sameName/data.qrc b/Tests/QtAutogen/SameName/data.qrc
index 4ce0b4e..4ce0b4e 100644
--- a/Tests/QtAutogen/sameName/data.qrc
+++ b/Tests/QtAutogen/SameName/data.qrc
diff --git a/Tests/QtAutogen/sameName/item.cpp b/Tests/QtAutogen/SameName/item.cpp
index 3d1fbe7..3d1fbe7 100644
--- a/Tests/QtAutogen/sameName/item.cpp
+++ b/Tests/QtAutogen/SameName/item.cpp
diff --git a/Tests/QtAutogen/sameName/item.hpp b/Tests/QtAutogen/SameName/item.hpp
index 75e83f4..75e83f4 100644
--- a/Tests/QtAutogen/sameName/item.hpp
+++ b/Tests/QtAutogen/SameName/item.hpp
diff --git a/Tests/QtAutogen/sameName/main.cpp b/Tests/QtAutogen/SameName/main.cpp
index a4ffcb3..a4ffcb3 100644
--- a/Tests/QtAutogen/sameName/main.cpp
+++ b/Tests/QtAutogen/SameName/main.cpp
diff --git a/Tests/QtAutogen/sameName/view.ui b/Tests/QtAutogen/SameName/view.ui
index 2ffe734..2ffe734 100644
--- a/Tests/QtAutogen/sameName/view.ui
+++ b/Tests/QtAutogen/SameName/view.ui
diff --git a/Tests/QtAutogen/staticLibraryCycle/CMakeLists.txt b/Tests/QtAutogen/StaticLibraryCycle/CMakeLists.txt
index 144a435..0c2f987 100644
--- a/Tests/QtAutogen/staticLibraryCycle/CMakeLists.txt
+++ b/Tests/QtAutogen/StaticLibraryCycle/CMakeLists.txt
@@ -1,5 +1,8 @@
-# Test AUTOMOC and AUTORCC on source files with the same name
-# but in different subdirectories
+cmake_minimum_required(VERSION 3.10)
+project(StaticLibraryCycle)
+include("../AutogenTest.cmake")
+
+# Test AUTOMOC on cyclic static libraries
set(CMAKE_AUTOMOC ON)
diff --git a/Tests/QtAutogen/StaticLibraryCycle/a.cpp b/Tests/QtAutogen/StaticLibraryCycle/a.cpp
new file mode 100644
index 0000000..faa52e6
--- /dev/null
+++ b/Tests/QtAutogen/StaticLibraryCycle/a.cpp
@@ -0,0 +1,12 @@
+#include "a.h"
+#include "b.h"
+
+bool A::recursed = false;
+
+A::A()
+{
+ if (!A::recursed) {
+ A::recursed = true;
+ B b;
+ }
+}
diff --git a/Tests/QtAutogen/staticLibraryCycle/a.h b/Tests/QtAutogen/StaticLibraryCycle/a.h
index 7176170..f24398e 100644
--- a/Tests/QtAutogen/staticLibraryCycle/a.h
+++ b/Tests/QtAutogen/StaticLibraryCycle/a.h
@@ -6,6 +6,8 @@
class A : public QObject
{
Q_OBJECT
+ static bool recursed;
+
public:
A();
};
diff --git a/Tests/QtAutogen/staticLibraryCycle/b.cpp b/Tests/QtAutogen/StaticLibraryCycle/b.cpp
index a807d89..a807d89 100644
--- a/Tests/QtAutogen/staticLibraryCycle/b.cpp
+++ b/Tests/QtAutogen/StaticLibraryCycle/b.cpp
diff --git a/Tests/QtAutogen/staticLibraryCycle/b.h b/Tests/QtAutogen/StaticLibraryCycle/b.h
index ededbd8..ededbd8 100644
--- a/Tests/QtAutogen/staticLibraryCycle/b.h
+++ b/Tests/QtAutogen/StaticLibraryCycle/b.h
diff --git a/Tests/QtAutogen/staticLibraryCycle/c.cpp b/Tests/QtAutogen/StaticLibraryCycle/c.cpp
index 7d427c2..7d427c2 100644
--- a/Tests/QtAutogen/staticLibraryCycle/c.cpp
+++ b/Tests/QtAutogen/StaticLibraryCycle/c.cpp
diff --git a/Tests/QtAutogen/staticLibraryCycle/c.h b/Tests/QtAutogen/StaticLibraryCycle/c.h
index 20f3725..20f3725 100644
--- a/Tests/QtAutogen/staticLibraryCycle/c.h
+++ b/Tests/QtAutogen/StaticLibraryCycle/c.h
diff --git a/Tests/QtAutogen/staticLibraryCycle/main.cpp b/Tests/QtAutogen/StaticLibraryCycle/main.cpp
index f5b7fd2..f5b7fd2 100644
--- a/Tests/QtAutogen/staticLibraryCycle/main.cpp
+++ b/Tests/QtAutogen/StaticLibraryCycle/main.cpp
diff --git a/Tests/QtAutogen/TestMacros.cmake b/Tests/QtAutogen/TestMacros.cmake
new file mode 100644
index 0000000..966f3b8
--- /dev/null
+++ b/Tests/QtAutogen/TestMacros.cmake
@@ -0,0 +1,60 @@
+# Autogen build options
+set(Autogen_BUILD_OPTIONS "-DQT_TEST_VERSION=${QT_TEST_VERSION}")
+if(NOT CMAKE_CONFIGURATION_TYPES)
+ list(APPEND Autogen_BUILD_OPTIONS "-DCMAKE_BUILD_TYPE=$<CONFIGURATION>")
+endif()
+list(APPEND Autogen_BUILD_OPTIONS
+ "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}"
+)
+
+# A macro to add a QtAutogen test
+macro(ADD_AUTOGEN_TEST NAME)
+ if(${ARGC} GREATER 1)
+ # 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(_TestCommand --test-command ${CMAKE_CTEST_COMMAND} -V)
+ else()
+ set(_TestCommand --test-command ${ARGN})
+ endif()
+ endif()
+
+ set(_QtXAutogen "Qt${QT_TEST_VERSION}Autogen")
+ set(_SourceDir "${CMake_SOURCE_DIR}/Tests/QtAutogen/${NAME}")
+ set(_BuildDir "${CMake_BINARY_DIR}/Tests/${_QtXAutogen}/${NAME}")
+ add_test(NAME "${_QtXAutogen}.${NAME}" COMMAND "${CMAKE_CTEST_COMMAND}"
+ --build-and-test
+ "${_SourceDir}"
+ "${_BuildDir}"
+ ${build_generator_args}
+ --build-project ${NAME}
+ --build-exe-dir "${_BuildDir}"
+ --force-new-ctest-process
+ --build-options ${build_options} ${Autogen_BUILD_OPTIONS}
+ ${_TestCommand}
+ )
+ list(APPEND TEST_BUILD_DIRS "${_BuildDir}")
+ unset(_TestCommand)
+ unset(_QtXAutogen)
+ unset(_SourceDir)
+ unset(_BuildDir)
+endmacro()
+
+# Allow using qtx_wrap_cpp and qtx_generate_moc or not
+set(QT_TEST_ALLOW_QT_MACROS TRUE)
+# Do a simple check if there is are non ASCII character in the build path
+string(REGEX MATCH "[^ -~]+" NON_ASCII_BDIR ${CMAKE_CURRENT_BINARY_DIR})
+if(NON_ASCII_BDIR)
+ # Qt4 moc does not support utf8 paths in _parameter files generated by
+ # qtx_wrap_cpp
+ # https://bugreports.qt.io/browse/QTBUG-35480
+ if(QT_TEST_VERSION STREQUAL 4)
+ set(QT_TEST_ALLOW_QT_MACROS FALSE)
+ endif()
+ # On windows qtx_wrap_cpp also fails in Qt5 when used on a path that
+ # contains non ASCII characters
+ if(WIN32)
+ set(QT_TEST_ALLOW_QT_MACROS FALSE)
+ endif()
+endif()
diff --git a/Tests/QtAutogen/uicInclude/CMakeLists.txt b/Tests/QtAutogen/UicInclude/CMakeLists.txt
index f62ebb0..56f76fb 100644
--- a/Tests/QtAutogen/uicInclude/CMakeLists.txt
+++ b/Tests/QtAutogen/UicInclude/CMakeLists.txt
@@ -1,5 +1,8 @@
-# Test moc include patterns
+cmake_minimum_required(VERSION 3.10)
+project(UicInclude)
+include("../AutogenTest.cmake")
+# Test uic include patterns
set(CMAKE_AUTOUIC_SEARCH_PATHS "dirA")
add_executable(uicInclude main.cpp)
diff --git a/Tests/QtAutogen/uicInclude/PageC.ui b/Tests/QtAutogen/UicInclude/PageC.ui
index bb2fb5e..bb2fb5e 100644
--- a/Tests/QtAutogen/uicInclude/PageC.ui
+++ b/Tests/QtAutogen/UicInclude/PageC.ui
diff --git a/Tests/QtAutogen/uicInclude/PageC2.ui b/Tests/QtAutogen/UicInclude/PageC2.ui
index daab868..daab868 100644
--- a/Tests/QtAutogen/uicInclude/PageC2.ui
+++ b/Tests/QtAutogen/UicInclude/PageC2.ui
diff --git a/Tests/QtAutogen/uicInclude/dirA/PageA.ui b/Tests/QtAutogen/UicInclude/dirA/PageA.ui
index dd81802..dd81802 100644
--- a/Tests/QtAutogen/uicInclude/dirA/PageA.ui
+++ b/Tests/QtAutogen/UicInclude/dirA/PageA.ui
diff --git a/Tests/QtAutogen/uicInclude/dirB/PageB.ui b/Tests/QtAutogen/UicInclude/dirB/PageB.ui
index fa6dfa6..fa6dfa6 100644
--- a/Tests/QtAutogen/uicInclude/dirB/PageB.ui
+++ b/Tests/QtAutogen/UicInclude/dirB/PageB.ui
diff --git a/Tests/QtAutogen/uicInclude/dirB/PageB2.ui b/Tests/QtAutogen/UicInclude/dirB/PageB2.ui
index 2225150..2225150 100644
--- a/Tests/QtAutogen/uicInclude/dirB/PageB2.ui
+++ b/Tests/QtAutogen/UicInclude/dirB/PageB2.ui
diff --git a/Tests/QtAutogen/uicInclude/dirB/subB/PageBsub.ui b/Tests/QtAutogen/UicInclude/dirB/subB/PageBsub.ui
index 873016e..873016e 100644
--- a/Tests/QtAutogen/uicInclude/dirB/subB/PageBsub.ui
+++ b/Tests/QtAutogen/UicInclude/dirB/subB/PageBsub.ui
diff --git a/Tests/QtAutogen/uicInclude/main.cpp b/Tests/QtAutogen/UicInclude/main.cpp
index c8e7609..c8e7609 100644
--- a/Tests/QtAutogen/uicInclude/main.cpp
+++ b/Tests/QtAutogen/UicInclude/main.cpp
diff --git a/Tests/QtAutogen/uicInclude/main.hpp b/Tests/QtAutogen/UicInclude/main.hpp
index 58ddc26..58ddc26 100644
--- a/Tests/QtAutogen/uicInclude/main.hpp
+++ b/Tests/QtAutogen/UicInclude/main.hpp
diff --git a/Tests/QtAutogen/uicInclude/subC/PageCsub.ui b/Tests/QtAutogen/UicInclude/subC/PageCsub.ui
index 0268326..0268326 100644
--- a/Tests/QtAutogen/uicInclude/subC/PageCsub.ui
+++ b/Tests/QtAutogen/UicInclude/subC/PageCsub.ui
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
diff --git a/Tests/QtAutogen/UicOnly/CMakeLists.txt b/Tests/QtAutogen/UicOnly/CMakeLists.txt
new file mode 100644
index 0000000..89a9a1b
--- /dev/null
+++ b/Tests/QtAutogen/UicOnly/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 3.10)
+project(UicOnly)
+include("../AutogenTest.cmake")
+
+# Test AUTOUIC being enabled only
+# The moc is provided by the Qt macro
+qtx_wrap_cpp(uicOnlyMoc uiconly.h)
+add_executable(uicOnly uiconly.cpp ${uicOnlyMoc})
+set_property(TARGET uicOnly PROPERTY AUTOUIC ON)
+target_link_libraries(uicOnly ${QT_LIBRARIES})
diff --git a/Tests/QtAutogen/uicOnlySource/uiconly.cpp b/Tests/QtAutogen/UicOnly/uiconly.cpp
index 7b91b25..7b91b25 100644
--- a/Tests/QtAutogen/uicOnlySource/uiconly.cpp
+++ b/Tests/QtAutogen/UicOnly/uiconly.cpp
diff --git a/Tests/QtAutogen/uicOnlySource/uiconly.h b/Tests/QtAutogen/UicOnly/uiconly.h
index 8f4eebe..8f4eebe 100644
--- a/Tests/QtAutogen/uicOnlySource/uiconly.h
+++ b/Tests/QtAutogen/UicOnly/uiconly.h
diff --git a/Tests/QtAutogen/uicOnlySource/uiconly.ui b/Tests/QtAutogen/UicOnly/uiconly.ui
index 13fb832..13fb832 100644
--- a/Tests/QtAutogen/uicOnlySource/uiconly.ui
+++ b/Tests/QtAutogen/UicOnly/uiconly.ui
diff --git a/Tests/QtAutogen/UicSkipSource/CMakeLists.txt b/Tests/QtAutogen/UicSkipSource/CMakeLists.txt
new file mode 100644
index 0000000..e94864d
--- /dev/null
+++ b/Tests/QtAutogen/UicSkipSource/CMakeLists.txt
@@ -0,0 +1,22 @@
+cmake_minimum_required(VERSION 3.10)
+project(UicSkipSource)
+include("../AutogenTest.cmake")
+
+# Test for SKIP_AUTOUIC and SKIP_AUTOGEN on an AUTOUIC enabled target
+set(skipUicSources
+ skipUic.cpp
+ skipUicGen.cpp
+ skipUicNoGen1.cpp
+ skipUicNoGen2.cpp
+)
+set_property(SOURCE skipUicNoGen1.cpp PROPERTY SKIP_AUTOUIC ON)
+set_property(SOURCE skipUicNoGen2.cpp PROPERTY SKIP_AUTOGEN ON)
+# AUTOUIC enabled
+add_executable(skipUicA ${skipUicSources})
+set_property(TARGET skipUicA PROPERTY AUTOUIC ON)
+target_link_libraries(skipUicA ${QT_LIBRARIES})
+# AUTOUIC and AUTOMOC enabled
+add_executable(skipUicB ${skipUicSources})
+set_property(TARGET skipUicB PROPERTY AUTOUIC ON)
+set_property(TARGET skipUicB PROPERTY AUTOMOC ON)
+target_link_libraries(skipUicB ${QT_LIBRARIES})
diff --git a/Tests/QtAutogen/skipUic.cpp b/Tests/QtAutogen/UicSkipSource/skipUic.cpp
index 0adf011..c4a7ce9 100644
--- a/Tests/QtAutogen/skipUic.cpp
+++ b/Tests/QtAutogen/UicSkipSource/skipUic.cpp
@@ -1,7 +1,7 @@
-#include "skipSource/skipUicGen.hpp"
-#include "skipSource/skipUicNoGen1.hpp"
-#include "skipSource/skipUicNoGen2.hpp"
+#include "skipUicGen.hpp"
+#include "skipUicNoGen1.hpp"
+#include "skipUicNoGen2.hpp"
int main(int, char**)
{
diff --git a/Tests/QtAutogen/skipSource/skipUicGen.cpp b/Tests/QtAutogen/UicSkipSource/skipUicGen.cpp
index d2a55a6..d2a55a6 100644
--- a/Tests/QtAutogen/skipSource/skipUicGen.cpp
+++ b/Tests/QtAutogen/UicSkipSource/skipUicGen.cpp
diff --git a/Tests/QtAutogen/skipSource/skipUicGen.hpp b/Tests/QtAutogen/UicSkipSource/skipUicGen.hpp
index 3669f0e..3669f0e 100644
--- a/Tests/QtAutogen/skipSource/skipUicGen.hpp
+++ b/Tests/QtAutogen/UicSkipSource/skipUicGen.hpp
diff --git a/Tests/QtAutogen/skipSource/skipUicNoGen1.cpp b/Tests/QtAutogen/UicSkipSource/skipUicNoGen1.cpp
index f591a42..f591a42 100644
--- a/Tests/QtAutogen/skipSource/skipUicNoGen1.cpp
+++ b/Tests/QtAutogen/UicSkipSource/skipUicNoGen1.cpp
diff --git a/Tests/QtAutogen/skipSource/skipUicNoGen1.hpp b/Tests/QtAutogen/UicSkipSource/skipUicNoGen1.hpp
index 2864695..2864695 100644
--- a/Tests/QtAutogen/skipSource/skipUicNoGen1.hpp
+++ b/Tests/QtAutogen/UicSkipSource/skipUicNoGen1.hpp
diff --git a/Tests/QtAutogen/skipSource/skipUicNoGen2.cpp b/Tests/QtAutogen/UicSkipSource/skipUicNoGen2.cpp
index 8c1c324..8c1c324 100644
--- a/Tests/QtAutogen/skipSource/skipUicNoGen2.cpp
+++ b/Tests/QtAutogen/UicSkipSource/skipUicNoGen2.cpp
diff --git a/Tests/QtAutogen/skipSource/skipUicNoGen2.hpp b/Tests/QtAutogen/UicSkipSource/skipUicNoGen2.hpp
index 7c38193..7c38193 100644
--- a/Tests/QtAutogen/skipSource/skipUicNoGen2.hpp
+++ b/Tests/QtAutogen/UicSkipSource/skipUicNoGen2.hpp
diff --git a/Tests/QtAutogen/skipSource/ui_nogen1.h b/Tests/QtAutogen/UicSkipSource/ui_nogen1.h
index a7be52b..a7be52b 100644
--- a/Tests/QtAutogen/skipSource/ui_nogen1.h
+++ b/Tests/QtAutogen/UicSkipSource/ui_nogen1.h
diff --git a/Tests/QtAutogen/skipSource/ui_nogen2.h b/Tests/QtAutogen/UicSkipSource/ui_nogen2.h
index 5d547d4..4e500a4 100644
--- a/Tests/QtAutogen/skipSource/ui_nogen2.h
+++ b/Tests/QtAutogen/UicSkipSource/ui_nogen2.h
@@ -3,4 +3,4 @@
void ui_nogen2();
-#endif \ No newline at end of file
+#endif
diff --git a/Tests/QtAutogen/skipSource/uigen1.ui b/Tests/QtAutogen/UicSkipSource/uigen1.ui
index fc7cb82..fc7cb82 100644
--- a/Tests/QtAutogen/skipSource/uigen1.ui
+++ b/Tests/QtAutogen/UicSkipSource/uigen1.ui
diff --git a/Tests/QtAutogen/skipSource/uigen2.ui b/Tests/QtAutogen/UicSkipSource/uigen2.ui
index 01f08d2..01f08d2 100644
--- a/Tests/QtAutogen/skipSource/uigen2.ui
+++ b/Tests/QtAutogen/UicSkipSource/uigen2.ui
diff --git a/Tests/QtAutogen/defines_test/CMakeLists.txt b/Tests/QtAutogen/defines_test/CMakeLists.txt
deleted file mode 100644
index 9ee9a22..0000000
--- a/Tests/QtAutogen/defines_test/CMakeLists.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-
-add_executable(defines_test defines_test.cpp)
-set_target_properties(defines_test PROPERTIES AUTOMOC TRUE)
-target_link_libraries(defines_test Qt4::QtGui)
diff --git a/Tests/QtAutogen/defines_test/defines_test.cpp b/Tests/QtAutogen/defines_test/defines_test.cpp
deleted file mode 100644
index cf4e9cb..0000000
--- a/Tests/QtAutogen/defines_test/defines_test.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-
-#include <QObject>
-
-#ifdef QT_GUI_LIB
-#include <QTextDocument>
-
-class SomeDocument : public QTextDocument
-{
- Q_OBJECT
-
-Q_SIGNALS:
- void someSig();
-};
-#endif
-
-#ifdef QT_CORE_LIB
-class SomeObject : public QObject
-{
- Q_OBJECT
-
-Q_SIGNALS:
- void someSig();
-};
-#endif
-
-int main(int argc, char** argv)
-{
-#ifdef QT_CORE_LIB
- QMetaObject sosmo = SomeObject::staticMetaObject;
-#endif
-#ifdef QT_GUI_LIB
- QMetaObject sdsmo = SomeDocument::staticMetaObject;
-#endif
-
- return 0;
-}
-
-#include "defines_test.moc"
diff --git a/Tests/QtAutogen/mocCMP0071/CMakeLists.txt b/Tests/QtAutogen/mocCMP0071/CMakeLists.txt
deleted file mode 100644
index 003fa08..0000000
--- a/Tests/QtAutogen/mocCMP0071/CMakeLists.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-cmake_minimum_required(VERSION 3.9)
-project(mocCMP0071 CXX)
-add_subdirectory(OLD)
-add_subdirectory(NEW)
diff --git a/Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt b/Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt
deleted file mode 100644
index 789354a..0000000
--- a/Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-# Test moc include patterns
-
-set(CMAKE_AUTOMOC_RELAXED_MODE FALSE)
-set(MOC_INCLUDE_NAME "mocIncludeStrict")
-
-include(${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/shared.cmake)
diff --git a/Tests/QtAutogen/mocMacroName/CMakeLists.txt b/Tests/QtAutogen/mocMacroName/CMakeLists.txt
deleted file mode 100644
index 08e6803..0000000
--- a/Tests/QtAutogen/mocMacroName/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-cmake_minimum_required(VERSION 3.9)
-
-list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "QO1_ALIAS")
-
-add_executable(mmn main.cpp Gadget.cpp Object.cpp Object1Aliased.cpp Object2Aliased.cpp)
-set_property(TARGET mmn PROPERTY AUTOMOC ON)
-set_property(TARGET mmn APPEND PROPERTY AUTOMOC_MACRO_NAMES "QO2_ALIAS")
-target_link_libraries(mmn ${QT_LIBRARIES})
diff --git a/Tests/QtAutogen/staticLibraryCycle/a.cpp b/Tests/QtAutogen/staticLibraryCycle/a.cpp
deleted file mode 100644
index 97cc66e..0000000
--- a/Tests/QtAutogen/staticLibraryCycle/a.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "a.h"
-#include "b.h"
-
-A::A()
-{
- B b;
-}
diff --git a/Tests/QtAutogenRerun/CMakeLists.txt b/Tests/QtAutogenRerun/CMakeLists.txt
deleted file mode 100644
index e72c191..0000000
--- a/Tests/QtAutogenRerun/CMakeLists.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-cmake_minimum_required(VERSION 3.9)
-cmake_policy(SET CMP0071 NEW)
-project(QtAutogenRerun)
-
-# 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)
-
- # Include this directory before using the UseQt4 file.
- add_subdirectory(defines_test)
-
- include(UseQt4)
-
- set(QT_QTCORE_TARGET Qt4::QtCore)
-
-else()
- if (NOT QT_TEST_VERSION STREQUAL 5)
- message(SEND_ERROR "Invalid Qt version specified.")
- endif()
- find_package(Qt5Widgets REQUIRED)
-
- set(QT_QTCORE_TARGET Qt5::Core)
-
- include_directories(${Qt5Widgets_INCLUDE_DIRS})
- set(QT_LIBRARIES Qt5::Widgets)
-
- if(Qt5_POSITION_INDEPENDENT_CODE AND CMAKE_CXX_COMPILE_OPTIONS_PIC)
- add_definitions(${CMAKE_CXX_COMPILE_OPTIONS_PIC})
- endif()
-
-endif()
-
-# Dummy executable to generate clean target
-add_executable(dummy dummy.cpp)
-
-# -- Test
-include("mocRerun.cmake")
-
-# -- Test
-# Tests Q_PLUGIN_METADATA json file change detection
-if (NOT QT_TEST_VERSION STREQUAL 4)
- include("mocPlugin.cmake")
-endif()
-
-# -- Test
-include("rccDepends.cmake")
diff --git a/Tests/QtAutogenRerun/defines_test/CMakeLists.txt b/Tests/QtAutogenRerun/defines_test/CMakeLists.txt
deleted file mode 100644
index 9ee9a22..0000000
--- a/Tests/QtAutogenRerun/defines_test/CMakeLists.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-
-add_executable(defines_test defines_test.cpp)
-set_target_properties(defines_test PROPERTIES AUTOMOC TRUE)
-target_link_libraries(defines_test Qt4::QtGui)
diff --git a/Tests/QtAutogenRerun/mocRerun.cmake b/Tests/QtAutogenRerun/mocRerun.cmake
deleted file mode 100644
index a92912b..0000000
--- a/Tests/QtAutogenRerun/mocRerun.cmake
+++ /dev/null
@@ -1,60 +0,0 @@
-
-set(timeformat "%Y%j%H%M%S")
-set(mocRerunSrcDir "${CMAKE_CURRENT_SOURCE_DIR}/mocRerun")
-set(mocRerunBinDir "${CMAKE_CURRENT_BINARY_DIR}/mocRerun")
-
-# Initial build
-configure_file("${mocRerunSrcDir}/test1a.h.in" "${mocRerunBinDir}/test1.h" COPYONLY)
-try_compile(MOC_RERUN
- "${mocRerunBinDir}"
- "${mocRerunSrcDir}"
- 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 of the output binary
-file(STRINGS "${mocRerunBinDir}/mocRerun.txt" mocRerunList ENCODING UTF-8)
-list(GET mocRerunList 0 mocRerunBin)
-
-message("Changing the header content for a MOC rerun")
-# - Acquire binary timestamps before the build
-file(TIMESTAMP "${mocRerunBin}" timeBefore "${timeformat}")
-# - Ensure that the timestamp will change
-# - Change header file content and rebuild
-# - Rebuild
-execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1)
-configure_file("${mocRerunSrcDir}/test1b.h.in" "${mocRerunBinDir}/test1.h" COPYONLY)
-execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${mocRerunBinDir}" RESULT_VARIABLE result )
-if (result)
- message(SEND_ERROR "Second build of mocRerun failed.")
-endif()
-# - Acquire binary timestamps after the build
-file(TIMESTAMP "${mocRerunBin}" timeAfter "${timeformat}")
-# - Test if timestamps changed
-if (NOT timeAfter GREATER timeBefore)
- message(SEND_ERROR "File (${mocRerunBin}) should have changed!")
-endif()
-
-
-message("Changing nothing for a MOC rerun")
-# - Acquire binary timestamps before the build
-file(TIMESTAMP "${mocRerunBin}" timeBefore "${timeformat}")
-# - Ensure that the timestamp would change
-# - Change nothing
-# - Rebuild
-execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1)
-execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${mocRerunBinDir}" RESULT_VARIABLE result )
-if (result)
- message(SEND_ERROR "Third build of mocRerun failed.")
-endif()
-# - Acquire binary timestamps after the build
-file(TIMESTAMP "${mocRerunBin}" timeAfter "${timeformat}")
-# - Test if timestamps changed
-if (timeAfter GREATER timeBefore)
- message(SEND_ERROR "File (${mocRerunBin}) should not have changed!")
-endif()
diff --git a/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt b/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt
deleted file mode 100644
index bafd9cf..0000000
--- a/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt
+++ /dev/null
@@ -1,33 +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>" > mocRerun.txt)
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-result.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-stderr-VS.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-stderr-VS.txt
new file mode 100644
index 0000000..5d19153
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-stderr-VS.txt
@@ -0,0 +1,7 @@
+CMake Error:
+ Error evaluating generator expression:
+
+ \$<COMPILE_LANGUAGE:CXX>
+
+ \$<COMPILE_LANGUAGE:...> may only be used for COMPILE_OPTIONS and
+ file\(GENERATE\) with the Visual Studio generator.
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-stderr-Xcode.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-stderr-Xcode.txt
new file mode 100644
index 0000000..4a4564e
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-stderr-Xcode.txt
@@ -0,0 +1,7 @@
+CMake Error:
+ Error evaluating generator expression:
+
+ \$<COMPILE_LANGUAGE:CXX>
+
+ \$<COMPILE_LANGUAGE:...> may only be used for COMPILE_OPTIONS and
+ file\(GENERATE\) with the Xcode generator.
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions.cmake b/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions.cmake
new file mode 100644
index 0000000..3a07d7d
--- /dev/null
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions.cmake
@@ -0,0 +1,5 @@
+
+enable_language(CXX)
+
+add_executable(main main.cpp)
+set_property(SOURCE main.cpp PROPERTY COMPILE_DEFINITIONS $<$<COMPILE_LANGUAGE:CXX>:ANYTHING>)
diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/RunCMakeTest.cmake b/Tests/RunCMake/COMPILE_LANGUAGE-genex/RunCMakeTest.cmake
index 421fa73..1a93dcd 100644
--- a/Tests/RunCMake/COMPILE_LANGUAGE-genex/RunCMakeTest.cmake
+++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/RunCMakeTest.cmake
@@ -14,3 +14,10 @@ elseif (RunCMake_GENERATOR MATCHES "Visual Studio")
set(RunCMake-stderr-file IncludeDirectories-stderr-VS.txt)
run_cmake(IncludeDirectories)
endif()
+if (RunCMake_GENERATOR STREQUAL "Xcode")
+ set(RunCMake-stderr-file PerSourceCompileDefinitions-stderr-Xcode.txt)
+ run_cmake(PerSourceCompileDefinitions)
+elseif (RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(RunCMake-stderr-file PerSourceCompileDefinitions-stderr-VS.txt)
+ run_cmake(PerSourceCompileDefinitions)
+endif()