diff options
-rw-r--r-- | Modules/CPackDeb.cmake | 28 | ||||
-rw-r--r-- | Modules/CPackRPM.cmake | 69 | ||||
-rw-r--r-- | Modules/Compiler/IAR-FindBinUtils.cmake | 4 | ||||
-rw-r--r-- | Modules/FindMPI.cmake | 289 | ||||
-rw-r--r-- | Modules/FindPerlLibs.cmake | 212 | ||||
-rw-r--r-- | Modules/FindPkgConfig.cmake | 251 | ||||
-rw-r--r-- | Modules/InstallRequiredSystemLibraries.cmake | 22 | ||||
-rw-r--r-- | Source/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 15 | ||||
-rw-r--r-- | Source/CTest/cmCTestBatchTestHandler.cxx | 123 | ||||
-rw-r--r-- | Source/CTest/cmCTestBatchTestHandler.h | 33 | ||||
-rw-r--r-- | Source/CTest/cmCTestBuildAndTestHandler.cxx | 19 | ||||
-rw-r--r-- | Source/CTest/cmCTestBuildAndTestHandler.h | 3 | ||||
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 3 | ||||
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 20 | ||||
-rw-r--r-- | Source/CTest/cmCTestScriptHandler.cxx | 11 | ||||
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 22 | ||||
-rw-r--r-- | Source/CTest/cmCTestTestHandler.h | 1 | ||||
-rw-r--r-- | Source/CTest/cmProcess.cxx | 19 | ||||
-rw-r--r-- | Source/CTest/cmProcess.h | 7 | ||||
-rw-r--r-- | Source/cmCTest.cxx | 34 | ||||
-rw-r--r-- | Source/cmCTest.h | 6 | ||||
-rw-r--r-- | Source/cmGraphVizWriter.cxx | 41 | ||||
-rw-r--r-- | Source/cmGraphVizWriter.h | 1 | ||||
-rw-r--r-- | Source/cmIDEOptions.cxx | 15 | ||||
-rw-r--r-- | Source/cmIDEOptions.h | 8 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 4 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 8 | ||||
-rw-r--r-- | Source/cmVisualStudioGeneratorOptions.cxx | 7 | ||||
-rw-r--r-- | Source/kwsys/CMakeLists.txt | 12 | ||||
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 13 | ||||
-rw-r--r-- | Source/kwsys/testSystemTools.cxx | 35 | ||||
-rw-r--r-- | Tests/CMakeLists.txt | 107 | ||||
-rw-r--r-- | Tests/Qt4Autogen/CMakeLists.txt | 9 | ||||
-rw-r--r-- | Tests/Qt5Autogen/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/QtAutogen/AutogenTest.cmake | 53 | ||||
-rw-r--r-- | Tests/QtAutogen/CMakeLists.txt | 233 | ||||
-rw-r--r-- | Tests/QtAutogen/CommonTests.cmake | 40 | ||||
-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.txt | 13 | ||||
-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.txt | 6 | ||||
-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.txt | 10 | ||||
-rw-r--r-- | Tests/QtAutogen/MocIncludeStrict/main.cpp (renamed from Tests/QtAutogen/mocIncludeRelaxed/main.cpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/MocMacroName/CMakeLists.txt | 17 | ||||
-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.txt | 8 | ||||
-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.txt | 9 | ||||
-rw-r--r-- | Tests/QtAutogen/MocOptions/Object.cpp | 5 | ||||
-rw-r--r-- | Tests/QtAutogen/MocOptions/Object.hpp | 13 | ||||
-rw-r--r-- | Tests/QtAutogen/MocOptions/main.cpp | 7 | ||||
-rw-r--r-- | Tests/QtAutogen/MocSkipSource/CMakeLists.txt | 36 | ||||
-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.txt | 8 | ||||
-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.txt | 17 | ||||
-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.txt | 8 | ||||
-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.txt | 23 | ||||
-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.txt | 65 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocBasic/MocBasic/CMakeLists.txt | 24 | ||||
-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.cpp | 5 | ||||
-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.cpp | 5 | ||||
-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.cpp | 12 | ||||
-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.cmake | 60 | ||||
-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.txt | 10 | ||||
-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.txt | 22 | ||||
-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.txt | 4 | ||||
-rw-r--r-- | Tests/QtAutogen/defines_test/defines_test.cpp | 38 | ||||
-rw-r--r-- | Tests/QtAutogen/mocCMP0071/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/QtAutogen/mocMacroName/CMakeLists.txt | 8 | ||||
-rw-r--r-- | Tests/QtAutogen/staticLibraryCycle/a.cpp | 7 | ||||
-rw-r--r-- | Tests/QtAutogenRerun/CMakeLists.txt | 52 | ||||
-rw-r--r-- | Tests/QtAutogenRerun/defines_test/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/QtAutogenRerun/mocRerun.cmake | 60 | ||||
-rw-r--r-- | Tests/QtAutogenRerun/mocRerun/CMakeLists.txt | 33 |
345 files changed, 1193 insertions, 1475 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index 91bf2f2..de1df3d 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -610,12 +610,7 @@ function(cpack_deb_prepare_package_vars) if(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OR CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS) # Generating binary list - Get type of all install files - cmake_policy(PUSH) - # Tell file(GLOB_RECURSE) not to follow directory symlinks - # even if the project does not set this policy to NEW. - cmake_policy(SET CMP0009 NEW) - file(GLOB_RECURSE FILE_PATHS_ LIST_DIRECTORIES false RELATIVE "${WDIR}" "${WDIR}/*") - cmake_policy(POP) + file(GLOB_RECURSE FILE_PATHS_ LIST_DIRECTORIES false RELATIVE "${WDIR}" "${WDIR}/*") find_program(FILE_EXECUTABLE file) if(NOT FILE_EXECUTABLE) @@ -931,13 +926,10 @@ function(cpack_deb_prepare_package_vars) if(CPACK_DEBIAN_ARCHIVE_TYPE) set(archive_types_ "paxr;gnutar") - cmake_policy(PUSH) - cmake_policy(SET CMP0057 NEW) - if(NOT CPACK_DEBIAN_ARCHIVE_TYPE IN_LIST archive_types_) - message(FATAL_ERROR "CPACK_DEBIAN_ARCHIVE_TYPE set to unsupported" - "type ${CPACK_DEBIAN_ARCHIVE_TYPE}") - endif() - cmake_policy(POP) + if(NOT CPACK_DEBIAN_ARCHIVE_TYPE IN_LIST archive_types_) + message(FATAL_ERROR "CPACK_DEBIAN_ARCHIVE_TYPE set to unsupported" + "type ${CPACK_DEBIAN_ARCHIVE_TYPE}") + endif() else() set(CPACK_DEBIAN_ARCHIVE_TYPE "paxr") endif() @@ -1039,13 +1031,9 @@ function(cpack_deb_prepare_package_vars) set(CPACK_OUTPUT_FILE_NAME "${CPACK_DEBIAN_PACKAGE_NAME}_${CPACK_DEBIAN_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb") else() - cmake_policy(PUSH) - cmake_policy(SET CMP0010 NEW) - if(NOT CPACK_DEBIAN_FILE_NAME MATCHES ".*\\.(deb|ipk)") - cmake_policy(POP) - message(FATAL_ERROR "'${CPACK_DEBIAN_FILE_NAME}' is not a valid DEB package file name as it must end with '.deb' or '.ipk'!") - endif() - cmake_policy(POP) + if(NOT CPACK_DEBIAN_FILE_NAME MATCHES ".*\\.(deb|ipk)") + message(FATAL_ERROR "'${CPACK_DEBIAN_FILE_NAME}' is not a valid DEB package file name as it must end with '.deb' or '.ipk'!") + endif() set(CPACK_OUTPUT_FILE_NAME "${CPACK_DEBIAN_FILE_NAME}") endif() diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index faa2df8..bb5181f 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -962,7 +962,6 @@ function(get_file_permissions FILE RETURN_VAR) ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) - cmake_policy(SET CMP0007 NEW) string(REPLACE " " ";" permissions_ "${permissions_}") list(GET permissions_ 0 permissions_) @@ -1066,12 +1065,7 @@ function(cpack_rpm_prepare_relocation_paths) endforeach() # warn about all the paths that are not relocatable - cmake_policy(PUSH) - # Tell file(GLOB_RECURSE) not to follow directory symlinks - # even if the project does not set this policy to NEW. - cmake_policy(SET CMP0009 NEW) - file(GLOB_RECURSE FILE_PATHS_ "${WDIR}/*") - cmake_policy(POP) + file(GLOB_RECURSE FILE_PATHS_ "${WDIR}/*") foreach(TMP_PATH ${FILE_PATHS_}) string(LENGTH "${WDIR}" WDIR_LEN) string(SUBSTRING "${TMP_PATH}" ${WDIR_LEN} -1 TMP_PATH) @@ -1098,10 +1092,7 @@ endfunction() function(cpack_rpm_prepare_content_list) # get files list - cmake_policy(PUSH) - cmake_policy(SET CMP0009 NEW) - file(GLOB_RECURSE CPACK_RPM_INSTALL_FILES LIST_DIRECTORIES true RELATIVE "${WDIR}" "${WDIR}/*") - cmake_policy(POP) + file(GLOB_RECURSE CPACK_RPM_INSTALL_FILES LIST_DIRECTORIES true RELATIVE "${WDIR}" "${WDIR}/*") set(CPACK_RPM_INSTALL_FILES "/${CPACK_RPM_INSTALL_FILES}") string(REPLACE ";" ";/" CPACK_RPM_INSTALL_FILES "${CPACK_RPM_INSTALL_FILES}") @@ -1120,10 +1111,7 @@ function(cpack_rpm_prepare_content_list) set(_DISTINCT_PATH "${_RPM_RELOCATION_PREFIX}") string(REPLACE "/" ";" _CPACK_RPM_PACKAGE_PREFIX_ELEMS " ${_RPM_RELOCATION_PREFIX}") - cmake_policy(PUSH) - cmake_policy(SET CMP0007 NEW) - list(REMOVE_AT _CPACK_RPM_PACKAGE_PREFIX_ELEMS -1) - cmake_policy(POP) + list(REMOVE_AT _CPACK_RPM_PACKAGE_PREFIX_ELEMS -1) unset(_TMP_LIST) # Now generate all of the parent dirs of the relocation path foreach(_PREFIX_PATH_ELEM ${_CPACK_RPM_PACKAGE_PREFIX_ELEMS}) @@ -1608,7 +1596,6 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR) endif() get_file_permissions("${WORKING_DIR}/${F}" permissions_) - cmake_policy(SET CMP0057 NEW) if(NOT "USER_EXECUTE" IN_LIST permissions_ AND NOT "GROUP_EXECUTE" IN_LIST permissions_ AND NOT "WORLD_EXECUTE" IN_LIST permissions_) @@ -1997,19 +1984,15 @@ function(cpack_rpm_generate_package) endif() if(DEFINED CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}) - cmake_policy(PUSH) - cmake_policy(SET CMP0057 NEW) - # Prefix can be replaced by Prefixes but the old version stil works so we'll ignore it for now - # Requires* is a special case because it gets transformed to Requires(pre/post/preun/postun) - # Auto* is a special case because the tags can not be queried by querytags rpmbuild flag - set(special_case_tags_ PREFIX REQUIRES_PRE REQUIRES_POST REQUIRES_PREUN REQUIRES_POSTUN AUTOPROV AUTOREQ AUTOREQPROV) - if(NOT _RPM_SPEC_HEADER IN_LIST RPMBUILD_TAG_LIST AND NOT _RPM_SPEC_HEADER IN_LIST special_case_tags_) - cmake_policy(POP) - message(AUTHOR_WARNING "CPackRPM:Warning: ${_RPM_SPEC_HEADER} not " - "supported in provided rpmbuild. Tag will not be used.") - continue() - endif() - cmake_policy(POP) + # Prefix can be replaced by Prefixes but the old version stil works so we'll ignore it for now + # Requires* is a special case because it gets transformed to Requires(pre/post/preun/postun) + # Auto* is a special case because the tags can not be queried by querytags rpmbuild flag + set(special_case_tags_ PREFIX REQUIRES_PRE REQUIRES_POST REQUIRES_PREUN REQUIRES_POSTUN AUTOPROV AUTOREQ AUTOREQPROV) + if(NOT _RPM_SPEC_HEADER IN_LIST RPMBUILD_TAG_LIST AND NOT _RPM_SPEC_HEADER IN_LIST special_case_tags_) + message(AUTHOR_WARNING "CPackRPM:Warning: ${_RPM_SPEC_HEADER} not " + "supported in provided rpmbuild. Tag will not be used.") + continue() + endif() if(CPACK_RPM_PACKAGE_DEBUG) message("CPackRPM:Debug: using CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}") @@ -2301,12 +2284,9 @@ function(cpack_rpm_generate_package) continue() endif() - cmake_policy(PUSH) - cmake_policy(SET CMP0009 NEW) - file(GLOB_RECURSE files_for_move_ LIST_DIRECTORIES false RELATIVE - "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${component_}" - "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${component_}/*") - cmake_policy(POP) + file(GLOB_RECURSE files_for_move_ LIST_DIRECTORIES false RELATIVE + "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${component_}" + "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${component_}/*") foreach(f_ IN LISTS files_for_move_) get_filename_component(dir_path_ "${f_}" DIRECTORY) @@ -2438,13 +2418,9 @@ ${TMP_DEBUGINFO_ADDITIONAL_SOURCES} "CPACK_RPM_FILE_NAME") if(NOT CPACK_RPM_FILE_NAME STREQUAL "RPM-DEFAULT") if(CPACK_RPM_FILE_NAME) - cmake_policy(PUSH) - cmake_policy(SET CMP0010 NEW) - if(NOT CPACK_RPM_FILE_NAME MATCHES ".*\\.rpm") - cmake_policy(POP) - message(FATAL_ERROR "'${CPACK_RPM_FILE_NAME}' is not a valid RPM package file name as it must end with '.rpm'!") - endif() - cmake_policy(POP) + if(NOT CPACK_RPM_FILE_NAME MATCHES ".*\\.rpm") + message(FATAL_ERROR "'${CPACK_RPM_FILE_NAME}' is not a valid RPM package file name as it must end with '.rpm'!") + endif() else() # old file name format for back compatibility string(TOUPPER "${CPACK_RPM_MAIN_COMPONENT}" @@ -2762,13 +2738,8 @@ mv %_topdir/tmpBBroot $RPM_BUILD_ROOT endif() # find generated rpm files and take their names - cmake_policy(PUSH) - # Tell file(GLOB_RECURSE) not to follow directory symlinks - # even if the project does not set this policy to NEW. - cmake_policy(SET CMP0009 NEW) - file(GLOB_RECURSE GENERATED_FILES "${CPACK_RPM_DIRECTORY}/RPMS/*.rpm" - "${CPACK_RPM_DIRECTORY}/SRPMS/*.rpm") - cmake_policy(POP) + file(GLOB_RECURSE GENERATED_FILES "${CPACK_RPM_DIRECTORY}/RPMS/*.rpm" + "${CPACK_RPM_DIRECTORY}/SRPMS/*.rpm") if(NOT GENERATED_FILES) message(FATAL_ERROR "RPM package was not generated! ${CPACK_RPM_DIRECTORY}") diff --git a/Modules/Compiler/IAR-FindBinUtils.cmake b/Modules/Compiler/IAR-FindBinUtils.cmake index b29ee81..5fecb26 100644 --- a/Modules/Compiler/IAR-FindBinUtils.cmake +++ b/Modules/Compiler/IAR-FindBinUtils.cmake @@ -10,7 +10,7 @@ get_filename_component(__iar_hint_2 "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPI set(__iar_hints "${__iar_hint_1}" "${__iar_hint_2}") -if("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM") +if("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM") # could allow using normal binutils ar, since objects are normal ELF files? find_program(CMAKE_IAR_LINKARM ilinkarm.exe HINTS ${__iar_hints} DOC "The IAR ARM linker") @@ -38,7 +38,7 @@ set(CMAKE_IAR_LINKARM \"${CMAKE_IAR_LINKARM}\") ") -elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR") +elseif("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR") # For AVR and AVR32, IAR uses the "xlink" linker and the "xar" archiver: find_program(CMAKE_IAR_LINKER xlink.exe HINTS ${__iar_hints} diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 4d9444a..db14a89 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -602,9 +602,6 @@ function (_MPI_interrogate_compiler lang) if(MPI_DIRECT_LIB_NAMES_WORK) set(MPI_PLAIN_LIB_NAMES_WORK "${MPI_DIRECT_LIB_NAMES_WORK};${MPI_PLAIN_LIB_NAMES_WORK}") endif() - if(MPI_${LANG}_EXTRA_LIB_NAMES) - list(APPEND MPI_PLAIN_LIB_NAMES_WORK "${MPI_${LANG}_EXTRA_LIB_NAMES}") - endif() # MPI might require pthread to work. The above mechanism wouldn't detect it, but we need to # link it in that case. -lpthread is covered by the normal library treatment on the other hand. @@ -617,6 +614,16 @@ function (_MPI_interrogate_compiler lang) endif() endif() + if(MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS) + list(APPEND MPI_COMPILE_DEFINITIONS_WORK "${MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS}") + endif() + if(MPI_${LANG}_EXTRA_COMPILE_OPTIONS) + list(APPEND MPI_COMPILE_OPTIONS_WORK "${MPI_${LANG}_EXTRA_COMPILE_OPTIONS}") + endif() + if(MPI_${LANG}_EXTRA_LIB_NAMES) + list(APPEND MPI_PLAIN_LIB_NAMES_WORK "${MPI_${LANG}_EXTRA_LIB_NAMES}") + endif() + # If we found MPI, set up all of the appropriate cache entries if(NOT MPI_${LANG}_COMPILE_OPTIONS) set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_COMPILE_OPTIONS_WORK} CACHE STRING "MPI ${LANG} compilation options" FORCE) @@ -825,33 +832,43 @@ endfunction() macro(_MPI_assemble_libraries LANG) set(MPI_${LANG}_LIBRARIES "") - foreach(mpilib IN LISTS MPI_${LANG}_LIB_NAMES) - list(APPEND MPI_${LANG}_LIBRARIES ${MPI_${mpilib}_LIBRARY}) - endforeach() + # Only for libraries do we need to check whether the compiler's linking stage is separate. + if(NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}" OR NOT MPI_${LANG}_WORKS_IMPLICIT) + foreach(mpilib IN LISTS MPI_${LANG}_LIB_NAMES) + list(APPEND MPI_${LANG}_LIBRARIES ${MPI_${mpilib}_LIBRARY}) + endforeach() + endif() endmacro() macro(_MPI_assemble_include_dirs LANG) - set(MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS}") - if("${LANG}" MATCHES "(C|CXX)") - if(MPI_${LANG}_HEADER_DIR) - list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_HEADER_DIR}") - endif() - else() # Fortran - if(MPI_${LANG}_F77_HEADER_DIR) - list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_F77_HEADER_DIR}") + if("${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") + set(MPI_${LANG}_INCLUDE_DIRS "") + else() + set(MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS}") + if("${LANG}" MATCHES "(C|CXX)") + if(MPI_${LANG}_HEADER_DIR) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_HEADER_DIR}") + endif() + else() # Fortran + if(MPI_${LANG}_F77_HEADER_DIR) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_F77_HEADER_DIR}") + endif() + if(MPI_${LANG}_MODULE_DIR AND NOT "${MPI_${LANG}_MODULE_DIR}" IN_LIST MPI_${LANG}_INCLUDE_DIRS) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_MODULE_DIR}") + endif() endif() - if(MPI_${LANG}_MODULE_DIR AND NOT "${MPI_${LANG}_MODULE_DIR}" IN_LIST MPI_${LANG}_INCLUDE_DIRS) - list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_MODULE_DIR}") + if(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) + foreach(MPI_ADDITIONAL_INC_DIR IN LISTS MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${MPI_ADDITIONAL_INC_DIR}_INCLUDE_DIR}") + endforeach() endif() endif() - if(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) - foreach(mpiadditionalinclude IN LISTS MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) - list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${mpiadditionalinclude}_INCLUDE_DIR}") - endforeach() - endif() endmacro() function(_MPI_split_include_dirs LANG) + if("${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") + return() + endif() # Backwards compatibility: Search INCLUDE_PATH if given. if(MPI_${LANG}_INCLUDE_PATH) list(APPEND MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_${LANG}_INCLUDE_PATH}") @@ -887,6 +904,13 @@ function(_MPI_split_include_dirs LANG) endif() mark_as_advanced(MPI_${LANG}_F77_HEADER_DIR MPI_${LANG}_MODULE_DIR) endif() + # Remove duplicates and default system directories from the list. + if(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + list(REMOVE_DUPLICATES MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + foreach(MPI_IMPLICIT_INC_DIR IN LISTS CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES) + list(REMOVE_ITEM MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_IMPLICIT_INC_DIR}) + endforeach() + endif() set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} additional include directories" FORCE) endfunction() @@ -1016,7 +1040,7 @@ elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "FreeBSD") # FreeBSD ships mpich under the normal system paths - but available openmpi implementations # will be found in /usr/local/mpi/<name> - MPI_search_mpi_prefix_folder("/usr/local/mpi/") + MPI_search_mpi_prefix_folder("/usr/local/mpi") endif() # Most MPI distributions have some form of mpiexec or mpirun which gives us something we can look for. @@ -1052,51 +1076,54 @@ mark_as_advanced(MPIEXEC_EXECUTABLE MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS MPIEXE # # Once we find the new variables, we translate them back into their old # equivalents below. -foreach (LANG IN ITEMS C CXX) - # Old input variables. - set(_MPI_OLD_INPUT_VARS COMPILER COMPILE_FLAGS INCLUDE_PATH LINK_FLAGS) - - # Set new vars based on their old equivalents, if the new versions are not already set. - foreach (var ${_MPI_OLD_INPUT_VARS}) - if (NOT MPI_${LANG}_${var} AND MPI_${var}) - set(MPI_${LANG}_${var} "${MPI_${var}}") - endif() - endforeach() - - # Chop the old compile flags into options and definitions - if(MPI_${LANG}_COMPILE_FLAGS) - unset(MPI_${LANG}_COMPILE_OPTIONS) - unset(MPI_${LANG}_COMPILE_DEFINITIONS) - separate_arguments(MPI_SEPARATE_FLAGS NATIVE_COMMAND "${MPI_${LANG}_COMPILE_FLAGS}") - foreach(_MPI_FLAG IN LISTS MPI_SEPARATE_FLAGS) - if("${_MPI_FLAG}" MATCHES "^ *[-/D]([^ ]+)") - list(APPEND MPI_${LANG}_COMPILE_DEFINITIONS "${CMAKE_MATCH_1}") - else() - list(APPEND MPI_${LANG}_COMPILE_FLAGS "${_MPI_FLAG}") +if(NOT MPI_IGNORE_LEGACY_VARIABLES) + foreach (LANG IN ITEMS C CXX) + # Old input variables. + set(_MPI_OLD_INPUT_VARS COMPILER COMPILE_FLAGS INCLUDE_PATH LINK_FLAGS) + + # Set new vars based on their old equivalents, if the new versions are not already set. + foreach (var ${_MPI_OLD_INPUT_VARS}) + if (NOT MPI_${LANG}_${var} AND MPI_${var}) + set(MPI_${LANG}_${var} "${MPI_${var}}") endif() endforeach() - unset(MPI_SEPARATE_FLAGS) - endif() - # If a list of libraries was given, we'll split it into new-style cache variables - unset(MPI_${LANG}_EXTRA_LIB_NAMES) - if(NOT MPI_${LANG}_LIB_NAMES) - foreach(_MPI_LIB IN LISTS MPI_${LANG}_LIBRARIES MPI_LIBRARY MPI_EXTRA_LIBRARY) - if(_MPI_LIB) - get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB}" NAME_WE) - get_filename_component(_MPI_LIB_NAME "${_MPI_LIB}" NAME) - get_filename_component(_MPI_LIB_DIR "${_MPI_LIB}" DIRECTORY) - list(APPEND MPI_${LANG}_EXTRA_LIB_NAMES "${_MPI_PLAIN_LIB_NAME}") - find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY - NAMES "${_MPI_LIB_NAME}" "lib${_MPI_LIB_NAME}" - HINTS ${_MPI_LIB_DIR} $ENV{MPI_LIB} - DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" - ) - mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) - endif() - endforeach() - endif() -endforeach() + # Chop the old compile flags into options and definitions + + unset(MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS) + unset(MPI_${LANG}_EXTRA_COMPILE_OPTIONS) + if(MPI_${LANG}_COMPILE_FLAGS) + separate_arguments(MPI_SEPARATE_FLAGS NATIVE_COMMAND "${MPI_${LANG}_COMPILE_FLAGS}") + foreach(_MPI_FLAG IN LISTS MPI_SEPARATE_FLAGS) + if("${_MPI_FLAG}" MATCHES "^ *[-/D]([^ ]+)") + list(APPEND MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS "${CMAKE_MATCH_1}") + else() + list(APPEND MPI_${LANG}_EXTRA_COMPILE_OPTIONS "${_MPI_FLAG}") + endif() + endforeach() + unset(MPI_SEPARATE_FLAGS) + endif() + + # If a list of libraries was given, we'll split it into new-style cache variables + unset(MPI_${LANG}_EXTRA_LIB_NAMES) + if(NOT MPI_${LANG}_LIB_NAMES) + foreach(_MPI_LIB IN LISTS MPI_${LANG}_LIBRARIES MPI_LIBRARY MPI_EXTRA_LIBRARY) + if(_MPI_LIB) + get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB}" NAME_WE) + get_filename_component(_MPI_LIB_NAME "${_MPI_LIB}" NAME) + get_filename_component(_MPI_LIB_DIR "${_MPI_LIB}" DIRECTORY) + list(APPEND MPI_${LANG}_EXTRA_LIB_NAMES "${_MPI_PLAIN_LIB_NAME}") + find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY + NAMES "${_MPI_LIB_NAME}" "lib${_MPI_LIB_NAME}" + HINTS ${_MPI_LIB_DIR} $ENV{MPI_LIB} + DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" + ) + mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) + endif() + endforeach() + endif() + endforeach() +endif() #============================================================================= unset(MPI_VERSION) @@ -1105,6 +1132,11 @@ unset(MPI_VERSION_MINOR) unset(_MPI_MIN_VERSION) +# If the user specified a library name we assume they prefer that library over a wrapper. If not, they can disable skipping manually. +if(NOT DEFINED MPI_SKIP_COMPILER_WRAPPER AND MPI_GUESS_LIBRARY_NAME) + set(MPI_SKIP_COMPILER_WRAPPER TRUE) +endif() + # This loop finds the compilers and sends them off for interrogation. foreach(LANG IN ITEMS C CXX Fortran) if(CMAKE_${LANG}_COMPILER_LOADED) @@ -1126,6 +1158,8 @@ foreach(LANG IN ITEMS C CXX Fortran) mark_as_advanced(MPI_CXX_SKIP_MPICXX) endif() if(NOT (MPI_${LANG}_LIB_NAMES AND (MPI_${LANG}_INCLUDE_PATH OR MPI_${LANG}_INCLUDE_DIRS OR MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS))) + set(MPI_${LANG}_TRIED_IMPLICIT FALSE) + set(MPI_${LANG}_WORKS_IMPLICIT FALSE) if(NOT MPI_${LANG}_COMPILER AND NOT MPI_ASSUME_NO_BUILTIN_MPI) # Should the imported targets be empty, we effectively try whether the compiler supports MPI on its own, which is the case on e.g. # Cray PrgEnv. @@ -1135,80 +1169,90 @@ foreach(LANG IN ITEMS C CXX Fortran) # If the compiler can build MPI code on its own, it functions as an MPI compiler and we'll set the variable to point to it. if(MPI_${LANG}_WORKS) set(MPI_${LANG}_COMPILER "${CMAKE_${LANG}_COMPILER}" CACHE FILEPATH "MPI compiler for ${LANG}" FORCE) + set(MPI_${LANG}_WORKS_IMPLICIT TRUE) endif() + set(MPI_${LANG}_TRIED_IMPLICIT TRUE) endif() - # If the user specified a library name we assume they prefer that library over a wrapper. If not, they can disable skipping manually. - if(NOT DEFINED MPI_SKIP_COMPILER_WRAPPER AND MPI_GUESS_LIBRARY_NAME) - set(MPI_SKIP_COMPILER_WRAPPER TRUE) - endif() - if(NOT MPI_SKIP_COMPILER_WRAPPER) - if(MPI_${LANG}_COMPILER) - # If the user supplies a compiler *name* instead of an absolute path, assume that we need to find THAT compiler. - if (NOT IS_ABSOLUTE "${MPI_${LANG}_COMPILER}") - # Get rid of our default list of names and just search for the name the user wants. - set(_MPI_${LANG}_COMPILER_NAMES "${MPI_${LANG}_COMPILER}") - unset(MPI_${LANG}_COMPILER CACHE) + if(NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}" OR NOT MPI_${LANG}_WORKS) + set(MPI_${LANG}_WRAPPER_FOUND FALSE) + set(MPI_PINNED_COMPILER FALSE) + + if(NOT MPI_SKIP_COMPILER_WRAPPER) + if(MPI_${LANG}_COMPILER) + # If the user supplies a compiler *name* instead of an absolute path, assume that we need to find THAT compiler. + if (NOT IS_ABSOLUTE "${MPI_${LANG}_COMPILER}") + # Get rid of our default list of names and just search for the name the user wants. + set(_MPI_${LANG}_COMPILER_NAMES "${MPI_${LANG}_COMPILER}") + unset(MPI_${LANG}_COMPILER CACHE) + endif() + # If the user specifies a compiler, we don't want to try to search libraries either. + set(MPI_PINNED_COMPILER TRUE) + endif() + + # If we have an MPI base directory, we'll try all compiler names in that one first. + # This should prevent mixing different MPI environments + if(_MPI_BASE_DIR) + find_program(MPI_${LANG}_COMPILER + NAMES ${_MPI_${LANG}_COMPILER_NAMES} + PATH_SUFFIXES bin sbin + HINTS ${_MPI_BASE_DIR} + NO_DEFAULT_PATH + DOC "MPI compiler for ${LANG}" + ) endif() - # If the user specifies a compiler, we don't want to try to search libraries either. - set(MPI_PINNED_COMPILER TRUE) - else() - set(MPI_PINNED_COMPILER FALSE) - endif() - # If we have an MPI base directory, we'll try all compiler names in that one first. - # This should prevent mixing different MPI environments - if(_MPI_BASE_DIR) + # If the base directory did not help (for example because the mpiexec isn't in the same directory as the compilers), + # we shall try searching in the default paths. find_program(MPI_${LANG}_COMPILER NAMES ${_MPI_${LANG}_COMPILER_NAMES} PATH_SUFFIXES bin sbin - HINTS ${_MPI_BASE_DIR} - NO_DEFAULT_PATH DOC "MPI compiler for ${LANG}" ) - endif() - # If the base directory did not help (for example because the mpiexec isn't in the same directory as the compilers), - # we shall try searching in the default paths. - find_program(MPI_${LANG}_COMPILER - NAMES ${_MPI_${LANG}_COMPILER_NAMES} - PATH_SUFFIXES bin sbin - DOC "MPI compiler for ${LANG}" - ) - - if(MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER) - set(MPI_SKIP_GUESSING TRUE) - elseif(MPI_${LANG}_COMPILER) - _MPI_interrogate_compiler(${LANG}) - else() - set(MPI_${LANG}_WRAPPER_FOUND FALSE) + if("${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") + set(MPI_PINNED_COMPILER TRUE) + + # If we haven't made the implicit compiler test yet, perform it now. + if(NOT MPI_${LANG}_TRIED_IMPLICIT) + _MPI_create_imported_target(${LANG}) + _MPI_check_lang_works(${LANG}) + endif() + + # Should the MPI compiler not work implicitly for MPI, still interrogate it. + # Otherwise, MPI compilers for which CMake has separate linking stages, e.g. Intel MPI on Windows where link.exe is being used + # directly during linkage instead of CMAKE_<LANG>_COMPILER will not work. + if(NOT MPI_${LANG}_WORKS) + set(MPI_${LANG}_WORKS_IMPLICIT FALSE) + _MPI_interrogate_compiler(${LANG}) + else() + set(MPI_${LANG}_WORKS_IMPLICIT TRUE) + endif() + elseif(MPI_${LANG}_COMPILER) + _MPI_interrogate_compiler(${LANG}) + endif() endif() - else() - set(MPI_${LANG}_WRAPPER_FOUND FALSE) - set(MPI_PINNED_COMPILER FALSE) - endif() - if(NOT MPI_${LANG}_WRAPPER_FOUND AND NOT MPI_PINNED_COMPILER) - # For C++, we may use the settings for C. Should a given compiler wrapper for C++ not exist, but one for C does, we copy over the - # settings for C. An MPI distribution that is in this situation would be IBM Platform MPI. - if("${LANG}" STREQUAL "CXX" AND MPI_C_WRAPPER_FOUND) - set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_C_COMPILE_OPTIONS} CACHE STRING "MPI ${LANG} compilation options" ) - set(MPI_${LANG}_COMPILE_DEFINITIONS ${MPI_C_COMPILE_DEFINITIONS} CACHE STRING "MPI ${LANG} compilation definitions" ) - set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_C_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} additional include directories") - set(MPI_${LANG}_LINK_FLAGS ${MPI_C_LINK_FLAGS} CACHE STRING "MPI ${LANG} linker flags" ) - set(MPI_${LANG}_LIB_NAMES ${MPI_C_LIB_NAMES} CACHE STRING "MPI ${LANG} libraries to link against" ) - set(MPI_${LANG}_WRAPPER_FOUND TRUE) - elseif(NOT MPI_SKIP_GUESSING) - _MPI_guess_settings(${LANG}) + if(NOT MPI_SKIP_GUESSING AND NOT MPI_${LANG}_WRAPPER_FOUND AND NOT MPI_PINNED_COMPILER) + # For C++, we may use the settings for C. Should a given compiler wrapper for C++ not exist, but one for C does, we copy over the + # settings for C. An MPI distribution that is in this situation would be IBM Platform MPI. + if("${LANG}" STREQUAL "CXX" AND MPI_C_WRAPPER_FOUND) + set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_C_COMPILE_OPTIONS} CACHE STRING "MPI ${LANG} compilation options" ) + set(MPI_${LANG}_COMPILE_DEFINITIONS ${MPI_C_COMPILE_DEFINITIONS} CACHE STRING "MPI ${LANG} compilation definitions" ) + set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_C_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} additional include directories") + set(MPI_${LANG}_LINK_FLAGS ${MPI_C_LINK_FLAGS} CACHE STRING "MPI ${LANG} linker flags" ) + set(MPI_${LANG}_LIB_NAMES ${MPI_C_LIB_NAMES} CACHE STRING "MPI ${LANG} libraries to link against" ) + else() + _MPI_guess_settings(${LANG}) + endif() endif() endif() endif() _MPI_split_include_dirs(${LANG}) - if(NOT MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER) - _MPI_assemble_include_dirs(${LANG}) - _MPI_assemble_libraries(${LANG}) - endif() + _MPI_assemble_include_dirs(${LANG}) + _MPI_assemble_libraries(${LANG}) + _MPI_adjust_compile_definitions(${LANG}) # We always create imported targets even if they're empty _MPI_create_imported_target(${LANG}) @@ -1222,7 +1266,9 @@ foreach(LANG IN ITEMS C CXX Fortran) set(MPI_${LANG}_COMPILE_DEFINITIONS "" CACHE STRING "MPI ${LANG} compilation definitions" ) set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "" CACHE STRING "MPI ${LANG} additional include directories") set(MPI_${LANG}_LINK_FLAGS "" CACHE STRING "MPI ${LANG} linker flags" ) - set(MPI_${LANG}_LIB_NAMES "" CACHE STRING "MPI ${LANG} libraries to link against" ) + if(NOT MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER) + set(MPI_${LANG}_LIB_NAMES "" CACHE STRING "MPI ${LANG} libraries to link against" ) + endif() mark_as_advanced(MPI_${LANG}_COMPILE_OPTIONS MPI_${LANG}_COMPILE_DEFINITIONS MPI_${LANG}_LINK_FLAGS MPI_${LANG}_LIB_NAMES MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS MPI_${LANG}_COMPILER) @@ -1453,6 +1499,7 @@ if (MPI_NUMLIBS GREATER 1) else() set(MPI_EXTRA_LIBRARY "MPI_EXTRA_LIBRARY-NOTFOUND") endif() +set(MPI_IGNORE_LEGACY_VARIABLES TRUE) #============================================================================= # unset these vars to cleanup namespace diff --git a/Modules/FindPerlLibs.cmake b/Modules/FindPerlLibs.cmake index e01e75e..0b902e7 100644 --- a/Modules/FindPerlLibs.cmake +++ b/Modules/FindPerlLibs.cmake @@ -32,193 +32,94 @@ # # :: # -# PERL_SITESEARCH = path to the sitesearch install dir -# PERL_SITELIB = path to the sitelib install directory -# PERL_VENDORARCH = path to the vendor arch install directory -# PERL_VENDORLIB = path to the vendor lib install directory -# PERL_ARCHLIB = path to the arch lib install directory -# PERL_PRIVLIB = path to the priv lib install directory +# PERL_SITESEARCH = path to the sitesearch install dir (-V:installsitesearch) +# PERL_SITEARCH = path to the sitelib install directory (-V:installsitearch) +# PERL_SITELIB = path to the sitelib install directory (-V:installsitelib) +# PERL_VENDORARCH = path to the vendor arch install directory (-V:installvendorarch) +# PERL_VENDORLIB = path to the vendor lib install directory (-V:installvendorlib) +# PERL_ARCHLIB = path to the core arch lib install directory (-V:archlib) +# PERL_PRIVLIB = path to the core priv lib install directory (-V:privlib) +# PERL_UPDATE_ARCHLIB = path to the update arch lib install directory (-V:installarchlib) +# PERL_UPDATE_PRIVLIB = path to the update priv lib install directory (-V:installprivlib) # PERL_EXTRA_C_FLAGS = Compilation flags used to build perl # find the perl executable include(${CMAKE_CURRENT_LIST_DIR}/FindPerl.cmake) if (PERL_EXECUTABLE) - ### PERL_PREFIX - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:prefix - OUTPUT_VARIABLE - PERL_PREFIX_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_PREFIX_RESULT_VARIABLE - ) - if (NOT PERL_PREFIX_RESULT_VARIABLE) - string(REGEX REPLACE "prefix='([^']+)'.*" "\\1" PERL_PREFIX ${PERL_PREFIX_OUTPUT_VARIABLE}) - endif () + function (perl_get_info _pgi_info tag) + cmake_parse_arguments(_PGI "IS_PATH" "" "" ${ARGN}) - ### PERL_ARCHNAME - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:archname - OUTPUT_VARIABLE - PERL_ARCHNAME_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_ARCHNAME_RESULT_VARIABLE - ) - if (NOT PERL_ARCHNAME_RESULT_VARIABLE) - string(REGEX REPLACE "archname='([^']+)'.*" "\\1" PERL_ARCHNAME ${PERL_ARCHNAME_OUTPUT_VARIABLE}) - endif () + set (${_pgi_info} NOTFOUND PARENT_SCOPE) + + execute_process(COMMAND "${PERL_EXECUTABLE}" -V:${tag} + OUTPUT_VARIABLE result + RESULT_VARIABLE status) + + if (NOT status) + string(REGEX REPLACE "${tag}='([^']*)'.*" "\\1" result "${result}") + if (_PGI_IS_PATH) + file(TO_CMAKE_PATH "${result}" result) + endif() + set (${_pgi_info} "${result}" PARENT_SCOPE) + endif () + endfunction() + ### PERL_PREFIX + perl_get_info(PERL_PREFIX prefix IS_PATH) + ### PERL_ARCHNAME + perl_get_info(PERL_ARCHNAME archname) ### PERL_EXTRA_C_FLAGS - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:cppflags - OUTPUT_VARIABLE - PERL_CPPFLAGS_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_CPPFLAGS_RESULT_VARIABLE - ) - if (NOT PERL_CPPFLAGS_RESULT_VARIABLE) - string(REGEX REPLACE "cppflags='([^']+)'.*" "\\1" PERL_EXTRA_C_FLAGS ${PERL_CPPFLAGS_OUTPUT_VARIABLE}) - endif () + perl_get_info(PERL_EXTRA_C_FLAGS cppflags) ### PERL_SITESEARCH - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:installsitesearch - OUTPUT_VARIABLE - PERL_SITESEARCH_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_SITESEARCH_RESULT_VARIABLE - ) - if (NOT PERL_SITESEARCH_RESULT_VARIABLE) - string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_SITESEARCH ${PERL_SITESEARCH_OUTPUT_VARIABLE}) - file(TO_CMAKE_PATH "${PERL_SITESEARCH}" PERL_SITESEARCH) - endif () + perl_get_info(PERL_SITESEARCH installsitesearch IS_PATH) + + ### PERL_SITEARCH + perl_get_info(PERL_SITEARCH installsitearch IS_PATH) ### PERL_SITELIB - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:installsitelib - OUTPUT_VARIABLE - PERL_SITELIB_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_SITELIB_RESULT_VARIABLE - ) - if (NOT PERL_SITELIB_RESULT_VARIABLE) - string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_SITELIB ${PERL_SITELIB_OUTPUT_VARIABLE}) - file(TO_CMAKE_PATH "${PERL_SITELIB}" PERL_SITELIB) - endif () + perl_get_info(PERL_SITELIB installsitelib IS_PATH) ### PERL_VENDORARCH - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:installvendorarch - OUTPUT_VARIABLE - PERL_VENDORARCH_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_VENDORARCH_RESULT_VARIABLE - ) - if (NOT PERL_VENDORARCH_RESULT_VARIABLE) - string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_VENDORARCH ${PERL_VENDORARCH_OUTPUT_VARIABLE}) - file(TO_CMAKE_PATH "${PERL_VENDORARCH}" PERL_VENDORARCH) - endif () + perl_get_info(PERL_VENDORARCH installvendorarch IS_PATH) ### PERL_VENDORLIB - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:installvendorlib - OUTPUT_VARIABLE - PERL_VENDORLIB_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_VENDORLIB_RESULT_VARIABLE - ) - if (NOT PERL_VENDORLIB_RESULT_VARIABLE) - string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_VENDORLIB ${PERL_VENDORLIB_OUTPUT_VARIABLE}) - file(TO_CMAKE_PATH "${PERL_VENDORLIB}" PERL_VENDORLIB) - endif () - - macro(perl_adjust_darwin_lib_variable varname) - string( TOUPPER PERL_${varname} FINDPERL_VARNAME ) - string( TOLOWER install${varname} PERL_VARNAME ) - - if (NOT PERL_MINUSV_OUTPUT_VARIABLE) - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V - OUTPUT_VARIABLE - PERL_MINUSV_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_MINUSV_RESULT_VARIABLE - ) - endif() - - if (NOT PERL_MINUSV_RESULT_VARIABLE) - string(REGEX MATCH "(${PERL_VARNAME}.*points? to the Updates directory)" - PERL_NEEDS_ADJUSTMENT ${PERL_MINUSV_OUTPUT_VARIABLE}) - - if (PERL_NEEDS_ADJUSTMENT) - string(REGEX REPLACE "(.*)/Updates/" "/System/\\1/" ${FINDPERL_VARNAME} ${${FINDPERL_VARNAME}}) - endif () - - endif () - endmacro() + perl_get_info(PERL_VENDORLIB installvendorlib IS_PATH) ### PERL_ARCHLIB - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:installarchlib - OUTPUT_VARIABLE - PERL_ARCHLIB_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_ARCHLIB_RESULT_VARIABLE - ) - if (NOT PERL_ARCHLIB_RESULT_VARIABLE) - string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_ARCHLIB ${PERL_ARCHLIB_OUTPUT_VARIABLE}) - perl_adjust_darwin_lib_variable( ARCHLIB ) - file(TO_CMAKE_PATH "${PERL_ARCHLIB}" PERL_ARCHLIB) - endif () + perl_get_info(PERL_ARCHLIB archlib IS_PATH) ### PERL_PRIVLIB - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:installprivlib - OUTPUT_VARIABLE - PERL_PRIVLIB_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_PRIVLIB_RESULT_VARIABLE - ) - if (NOT PERL_PRIVLIB_RESULT_VARIABLE) - string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_PRIVLIB ${PERL_PRIVLIB_OUTPUT_VARIABLE}) - perl_adjust_darwin_lib_variable( PRIVLIB ) - file(TO_CMAKE_PATH "${PERL_PRIVLIB}" PERL_PRIVLIB) - endif () + perl_get_info(PERL_PRIVLIB privlib IS_PATH) + + ### PERL_UPDATE_ARCHLIB + perl_get_info(PERL_UPDATE_ARCHLIB installarchlib IS_PATH) + + ### PERL_UPDATE_PRIVLIB + perl_get_info(PERL_UPDATE_PRIVLIB installprivlib IS_PATH) ### PERL_POSSIBLE_LIBRARY_NAMES - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:libperl - OUTPUT_VARIABLE - PERL_LIBRARY_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_LIBRARY_RESULT_VARIABLE - ) - if (NOT PERL_LIBRARY_RESULT_VARIABLE) - string(REGEX REPLACE "libperl='([^']+)'.*" "\\1" PERL_POSSIBLE_LIBRARY_NAMES ${PERL_LIBRARY_OUTPUT_VARIABLE}) - else () + perl_get_info(PERL_POSSIBLE_LIBRARY_NAMES libperl) + if (NOT PERL_POSSIBLE_LIBRARY_NAMES) set(PERL_POSSIBLE_LIBRARY_NAMES perl${PERL_VERSION_STRING} perl) - endif () + endif() + if (CMAKE_SYSTEM_NAME MATCHES "MSYS|CYGWIN") + # on MSYS and CYGWIN environments, current perl -V:libperl gives shared library name + # rather than the import library. So, extends possible library names + list (APPEND PERL_POSSIBLE_LIBRARY_NAMES perl) + endif() ### PERL_INCLUDE_PATH find_path(PERL_INCLUDE_PATH NAMES perl.h PATHS - ${PERL_ARCHLIB}/CORE + "${PERL_UPDATE_ARCHLIB}/CORE" + "${PERL_ARCHLIB}/CORE" /usr/lib/perl5/${PERL_VERSION_STRING}/${PERL_ARCHNAME}/CORE /usr/lib/perl/${PERL_VERSION_STRING}/${PERL_ARCHNAME}/CORE /usr/lib/perl5/${PERL_VERSION_STRING}/CORE @@ -230,7 +131,8 @@ if (PERL_EXECUTABLE) NAMES ${PERL_POSSIBLE_LIBRARY_NAMES} PATHS - ${PERL_ARCHLIB}/CORE + "${PERL_UPDATE_ARCHLIB}/CORE" + "${PERL_ARCHLIB}/CORE" /usr/lib/perl5/${PERL_VERSION_STRING}/${PERL_ARCHNAME}/CORE /usr/lib/perl/${PERL_VERSION_STRING}/${PERL_ARCHNAME}/CORE /usr/lib/perl5/${PERL_VERSION_STRING}/CORE diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index 76afa8a..aad3b74 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -1,19 +1,22 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -#.rst: -# FindPkgConfig -# ------------- -# -# A `pkg-config` module for CMake. -# -# Finds the ``pkg-config`` executable and add the -# :command:`pkg_check_modules` and :command:`pkg_search_module` -# commands. -# -# In order to find the ``pkg-config`` executable, it uses the -# :variable:`PKG_CONFIG_EXECUTABLE` variable or the ``PKG_CONFIG`` -# environment variable first. +#[========================================[.rst: +FindPkgConfig +------------- + +A ``pkg-config`` module for CMake. + +Finds the ``pkg-config`` executable and adds the :command:`pkg_get_variable`, +:command:`pkg_check_modules` and :command:`pkg_search_module` commands. The +following variables will also be set:: + + PKG_CONFIG_FOUND ... if pkg-config executable was found + PKG_CONFIG_EXECUTABLE ... pathname of the pkg-config program + PKG_CONFIG_VERSION_STRING ... the version of the pkg-config program found + (since CMake 2.8.8) + +#]========================================] ### Common stuff #### set(PKG_CONFIG_VERSION 1) @@ -82,12 +85,13 @@ endmacro() #[========================================[.rst: .. command:: pkg_get_variable - Retrieves the value of a variable from a package:: + Retrieves the value of a pkg-config variable ``varName`` and stores it in the + result variable ``resultVar`` in the calling scope. :: - pkg_get_variable(<RESULT> <MODULE> <VARIABLE>) + pkg_get_variable(<resultVar> <moduleName> <varName>) - If multiple values are returned variable will contain a - :ref:`;-list <CMake Language Lists>`. + If ``pkg-config`` returns multiple values for the specified variable, + ``resultVar`` will contain a :ref:`;-list <CMake Language Lists>`. For example: @@ -472,117 +476,106 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma endif() endmacro() -### -### User visible macros start here -### #[========================================[.rst: .. command:: pkg_check_modules - Checks for all the given modules. :: + Checks for all the given modules, setting a variety of result variables in + the calling scope. :: - pkg_check_modules(<PREFIX> [REQUIRED] [QUIET] - [NO_CMAKE_PATH] [NO_CMAKE_ENVIRONMENT_PATH] + pkg_check_modules(<prefix> + [REQUIRED] [QUIET] + [NO_CMAKE_PATH] + [NO_CMAKE_ENVIRONMENT_PATH] [IMPORTED_TARGET] - <MODULE> [<MODULE>]*) - - - When the ``REQUIRED`` argument was set, macros will fail with an error - when module(s) could not be found. - - When the ``QUIET`` argument is set, no status messages will be printed. - - By default, if :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` is 3.1 or - later, or if :variable:`PKG_CONFIG_USE_CMAKE_PREFIX_PATH` is set, the - :variable:`CMAKE_PREFIX_PATH`, :variable:`CMAKE_FRAMEWORK_PATH`, and - :variable:`CMAKE_APPBUNDLE_PATH` cache and environment variables will - be added to ``pkg-config`` search path. - The ``NO_CMAKE_PATH`` and ``NO_CMAKE_ENVIRONMENT_PATH`` arguments - disable this behavior for the cache variables and the environment - variables, respectively. - The ``IMPORTED_TARGET`` argument will create an imported target named - PkgConfig::<PREFIX>> that can be passed directly as an argument to - :command:`target_link_libraries`. - - It sets the following variables: :: - - PKG_CONFIG_FOUND ... if pkg-config executable was found - PKG_CONFIG_EXECUTABLE ... pathname of the pkg-config program - PKG_CONFIG_VERSION_STRING ... the version of the pkg-config program found - (since CMake 2.8.8) - - For the following variables two sets of values exist; first one is the - common one and has the given PREFIX. The second set contains flags - which are given out when ``pkg-config`` was called with the ``--static`` - option. :: - - <XPREFIX>_FOUND ... set to 1 if module(s) exist - <XPREFIX>_LIBRARIES ... only the libraries (w/o the '-l') - <XPREFIX>_LIBRARY_DIRS ... the paths of the libraries (w/o the '-L') - <XPREFIX>_LDFLAGS ... all required linker flags - <XPREFIX>_LDFLAGS_OTHER ... all other linker flags - <XPREFIX>_INCLUDE_DIRS ... the '-I' preprocessor flags (w/o the '-I') - <XPREFIX>_CFLAGS ... all required cflags - <XPREFIX>_CFLAGS_OTHER ... the other compiler flags + <moduleSpec> [<moduleSpec>...]) + + When the ``REQUIRED`` argument is given, the command will fail with an error + if module(s) could not be found. + + When the ``QUIET`` argument is given, no status messages will be printed. + + By default, if :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` is 3.1 or + later, or if :variable:`PKG_CONFIG_USE_CMAKE_PREFIX_PATH` is set to a + boolean ``True`` value, then the :variable:`CMAKE_PREFIX_PATH`, + :variable:`CMAKE_FRAMEWORK_PATH`, and :variable:`CMAKE_APPBUNDLE_PATH` cache + and environment variables will be added to the ``pkg-config`` search path. + The ``NO_CMAKE_PATH`` and ``NO_CMAKE_ENVIRONMENT_PATH`` arguments + disable this behavior for the cache variables and environment variables + respectively. + + The ``IMPORTED_TARGET`` argument will create an imported target named + ``PkgConfig::<prefix>`` that can be passed directly as an argument to + :command:`target_link_libraries`. + + Each ``<moduleSpec>`` must be in one of the following formats:: + + {moduleName} ... matches any version + {moduleName}>={version} ... at least version <version> is required + {moduleName}={version} ... exactly version <version> is required + {moduleName}<={version} ... modules must not be newer than <version> + + The following variables may be set upon return. Two sets of values exist, + one for the common case (``<XXX> = <prefix>``) and another for the + information ``pkg-config`` provides when it is called with the ``--static`` + option (``<XXX> = <prefix>_STATIC``):: + + <XXX>_FOUND ... set to 1 if module(s) exist + <XXX>_LIBRARIES ... only the libraries (without the '-l') + <XXX>_LIBRARY_DIRS ... the paths of the libraries (without the '-L') + <XXX>_LDFLAGS ... all required linker flags + <XXX>_LDFLAGS_OTHER ... all other linker flags + <XXX>_INCLUDE_DIRS ... the '-I' preprocessor flags (without the '-I') + <XXX>_CFLAGS ... all required cflags + <XXX>_CFLAGS_OTHER ... the other compiler flags + + All but ``<XXX>_FOUND`` may be a :ref:`;-list <CMake Language Lists>` if the + associated variable returned from ``pkg-config`` has multiple values. + + There are some special variables whose prefix depends on the number of + ``<moduleSpec>`` given. When there is only one ``<moduleSpec>``, + ``<YYY>`` will simply be ``<prefix>``, but if two or more ``<moduleSpec>`` + items are given, ``<YYY>`` will be ``<prefix>_<moduleName>``:: + + <YYY>_VERSION ... version of the module + <YYY>_PREFIX ... prefix directory of the module + <YYY>_INCLUDEDIR ... include directory of the module + <YYY>_LIBDIR ... lib directory of the module + + Examples - :: - - <XPREFIX> = <PREFIX> for common case - <XPREFIX> = <PREFIX>_STATIC for static linking - - Every variable containing multiple values will be a - :ref:`;-list <CMake Language Lists>`. - - There are some special variables whose prefix depends on the count of - given modules. When there is only one module, <PREFIX> stays - unchanged. When there are multiple modules, the prefix will be - changed to <PREFIX>_<MODNAME>: :: - - <XPREFIX>_VERSION ... version of the module - <XPREFIX>_PREFIX ... prefix-directory of the module - <XPREFIX>_INCLUDEDIR ... include-dir of the module - <XPREFIX>_LIBDIR ... lib-dir of the module - - :: - - <XPREFIX> = <PREFIX> when |MODULES| == 1, else - <XPREFIX> = <PREFIX>_<MODNAME> - - A <MODULE> parameter can have the following formats: :: - - {MODNAME} ... matches any version - {MODNAME}>={VERSION} ... at least version <VERSION> is required - {MODNAME}={VERSION} ... exactly version <VERSION> is required - {MODNAME}<={VERSION} ... modules must not be newer than <VERSION> - - Examples + .. code-block:: cmake - .. code-block:: cmake + pkg_check_modules (GLIB2 glib-2.0) - pkg_check_modules (GLIB2 glib-2.0) + Looks for any version of glib2. If found, the output variable + ``GLIB2_VERSION`` will hold the actual version found. - .. code-block:: cmake + .. code-block:: cmake - pkg_check_modules (GLIB2 glib-2.0>=2.10) + pkg_check_modules (GLIB2 glib-2.0>=2.10) - Requires at least version 2.10 of glib2 and defines e.g. - ``GLIB2_VERSION=2.10.3`` + Looks for at least version 2.10 of glib2. If found, the output variable + ``GLIB2_VERSION`` will hold the actual version found. - .. code-block:: cmake + .. code-block:: cmake - pkg_check_modules (FOO glib-2.0>=2.10 gtk+-2.0) + pkg_check_modules (FOO glib-2.0>=2.10 gtk+-2.0) - Requires both glib2 and gtk2, and defines e.g. - ``FOO_glib-2.0_VERSION=2.10.3`` and ``FOO_gtk+-2.0_VERSION=2.8.20`` + Looks for both glib2-2.0 (at least version 2.10) and any version of + gtk2+-2.0. Only if both are found will ``FOO`` be considered found. + The ``FOO_glib-2.0_VERSION`` and ``FOO_gtk+-2.0_VERSION`` variables will be + set to their respective found module versions. - .. code-block:: cmake + .. code-block:: cmake pkg_check_modules (XRENDER REQUIRED xrender) - Defines for example:: + Requires any version of ``xrender``. Example output variables set by a + successful call:: - XRENDER_LIBRARIES=Xrender;X11`` - XRENDER_STATIC_LIBRARIES=Xrender;X11;pthread;Xau;Xdmcp + XRENDER_LIBRARIES=Xrender;X11 + XRENDER_STATIC_LIBRARIES=Xrender;X11;pthread;Xau;Xdmcp #]========================================] macro(pkg_check_modules _prefix _module0) _pkgconfig_parse_options(_pkg_modules _pkg_is_required _pkg_is_silent _no_cmake_path _no_cmake_environment_path _imp_target "${_module0}" ${ARGN}) @@ -605,19 +598,22 @@ endmacro() #[========================================[.rst: .. command:: pkg_search_module - Same as :command:`pkg_check_modules`, but instead it checks for given - modules and uses the first working one. :: + The behavior of this command is the same as :command:`pkg_check_modules`, + except that rather than checking for all the specified modules, it searches + for just the first successful match. :: - pkg_search_module(<PREFIX> [REQUIRED] [QUIET] - [NO_CMAKE_PATH] [NO_CMAKE_ENVIRONMENT_PATH] + pkg_search_module(<prefix> + [REQUIRED] [QUIET] + [NO_CMAKE_PATH] + [NO_CMAKE_ENVIRONMENT_PATH] [IMPORTED_TARGET] - <MODULE> [<MODULE>]*) + <moduleSpec> [<moduleSpec>...]) - Examples + Examples - .. code-block:: cmake + .. code-block:: cmake - pkg_search_module (BAR libxml-2.0 libxml2 libxml>=2) + pkg_search_module (BAR libxml-2.0 libxml2 libxml>=2) #]========================================] macro(pkg_search_module _prefix _module0) _pkgconfig_parse_options(_pkg_modules_alt _pkg_is_required _pkg_is_silent _no_cmake_path _no_cmake_environment_path _imp_target "${_module0}" ${ARGN}) @@ -654,21 +650,26 @@ endmacro() #[========================================[.rst: -.. variable:: PKG_CONFIG_EXECUTABLE +Variables Affecting Behavior +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Path to the pkg-config executable. +.. variable:: PKG_CONFIG_EXECUTABLE + This can be set to the path of the pkg-config executable. If not provided, + it will be set by the module as a result of calling :command:`find_program` + internally. The ``PKG_CONFIG`` environment variable can be used as a hint. .. variable:: PKG_CONFIG_USE_CMAKE_PREFIX_PATH - Whether :command:`pkg_check_modules` and :command:`pkg_search_module` - should add the paths in :variable:`CMAKE_PREFIX_PATH`, - :variable:`CMAKE_FRAMEWORK_PATH`, and :variable:`CMAKE_APPBUNDLE_PATH` - cache and environment variables to ``pkg-config`` search path. + Specifies whether :command:`pkg_check_modules` and + :command:`pkg_search_module` should add the paths in the + :variable:`CMAKE_PREFIX_PATH`, :variable:`CMAKE_FRAMEWORK_PATH` and + :variable:`CMAKE_APPBUNDLE_PATH` cache and environment variables to the + ``pkg-config`` search path. - If this variable is not set, this behavior is enabled by default if - :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` is 3.1 or later, disabled - otherwise. + If this variable is not set, this behavior is enabled by default if + :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` is 3.1 or later, disabled + otherwise. #]========================================] diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 38e0861..797f9e4 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -56,10 +56,13 @@ # Specify the :command:`install(PROGRAMS)` command ``COMPONENT`` # option. If not specified, no such option will be used. +cmake_policy(PUSH) +cmake_policy(SET CMP0054 NEW) # if() quoted variables not dereferenced + set(_IRSL_HAVE_Intel FALSE) set(_IRSL_HAVE_MSVC FALSE) foreach(LANG IN ITEMS C CXX Fortran) - if(CMAKE_${LANG}_COMPILER_ID STREQUAL Intel) + if("${CMAKE_${LANG}_COMPILER_ID}" STREQUAL "Intel") if(NOT _IRSL_HAVE_Intel) get_filename_component(_Intel_basedir "${CMAKE_${LANG}_COMPILER}" PATH) if(CMAKE_SIZEOF_VOID_P EQUAL 8) @@ -81,7 +84,7 @@ foreach(LANG IN ITEMS C CXX Fortran) endif() set(_IRSL_HAVE_Intel TRUE) endif() - elseif(CMAKE_${LANG}_COMPILER_ID STREQUAL MSVC) + elseif("${CMAKE_${LANG}_COMPILER_ID}" STREQUAL "MSVC") set(_IRSL_HAVE_MSVC TRUE) endif() endforeach() @@ -600,11 +603,14 @@ if(_IRSL_HAVE_Intel) if(_Intel_compiler_ver VERSION_LESS 18) list(APPEND __install_dirs "${_Intel_redistdir}/irml" "${_Intel_redistdir}/irml_c") endif() - foreach(__Intel_lib IN ITEMS cilkrts20.dll libchkp.dll libgfxoffload.dll libioffload_host.dll libirngmd.dll + foreach(__Intel_lib IN ITEMS cilkrts20.dll libchkp.dll libioffload_host.dll libirngmd.dll libmmd.dll libmmdd.dll libmpx.dll liboffload.dll svml_dispmd.dll) list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") endforeach() + if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL Intel) + list(APPEND __install_libs "${_Intel_redistdir}/libgfxoffload.dll") + endif() if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel) foreach(__Intel_lib IN ITEMS ifdlg100.dll libicaf.dll libifcoremd.dll libifcoremdd.dll libifcorert.dll libifcorertd.dll libifportmd.dll) @@ -637,10 +643,10 @@ if(_IRSL_HAVE_Intel) endforeach() endif() if(_Intel_compiler_ver VERSION_GREATER_EQUAL 15) - foreach(__Intel_lib IN ITEMS libgfxoffload.so libistrconv.so) - - list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") - endforeach() + list(APPEND __install_libs "${_Intel_redistdir}/libistrconv.so") + if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL Intel) + list(APPEND __install_libs "${_Intel_redistdir}/libgfxoffload.so") + endif() endif() if(_Intel_compiler_ver VERSION_GREATER_EQUAL 16) foreach(__Intel_lib IN ITEMS libioffload_host.so libioffload_host.so.5 libioffload_target.so libioffload_target.so.5 libmpx.so offload_main) @@ -743,3 +749,5 @@ if(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS) ) endif() endif() + +cmake_policy(POP) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 5611e55..7031d5a 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -802,7 +802,6 @@ include_directories( # set(CTEST_SRCS cmCTest.cxx CTest/cmProcess.cxx - CTest/cmCTestBatchTestHandler.cxx CTest/cmCTestBuildAndTestHandler.cxx CTest/cmCTestBuildCommand.cxx CTest/cmCTestBuildHandler.cxx diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 0ee6fb1..3556f94 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 10) -set(CMake_VERSION_PATCH 20171211) +set(CMake_VERSION_PATCH 20171214) #set(CMake_VERSION_RC 1) diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index be75a9f..ea0e899 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -17,6 +17,7 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmStateSnapshot.h" +#include "cmVersion.h" #include "cmWorkingDirectory.h" #include "cmXMLSafe.h" #include "cmake.h" @@ -988,10 +989,16 @@ int cmCPackGenerator::DoPackage() */ packageFileNames.push_back(tempPackageFileName ? tempPackageFileName : ""); toplevel = tempDirectory; - if (!this->PackageFiles() || cmSystemTools::GetErrorOccuredFlag()) { - cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem compressing the directory" - << std::endl); - return 0; + { // scope that enables package generators to run internal scripts with + // latest CMake policies enabled + cmMakefile::ScopePushPop pp{ this->MakefileMap }; + this->MakefileMap->SetPolicyVersion(cmVersion::GetCMakeVersion()); + + if (!this->PackageFiles() || cmSystemTools::GetErrorOccuredFlag()) { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem compressing the directory" + << std::endl); + return 0; + } } /* Prepare checksum algorithm*/ diff --git a/Source/CTest/cmCTestBatchTestHandler.cxx b/Source/CTest/cmCTestBatchTestHandler.cxx deleted file mode 100644 index 2eed8be..0000000 --- a/Source/CTest/cmCTestBatchTestHandler.cxx +++ /dev/null @@ -1,123 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmCTestBatchTestHandler.h" - -#include "cmCTest.h" -#include "cmCTestMultiProcessHandler.h" -#include "cmCTestTestHandler.h" -#include "cmProcess.h" -#include "cmSystemTools.h" - -#include <map> -#include <utility> -#include <vector> - -cmCTestBatchTestHandler::~cmCTestBatchTestHandler() -{ -} - -void cmCTestBatchTestHandler::RunTests() -{ - this->WriteBatchScript(); - this->SubmitBatchScript(); -} - -void cmCTestBatchTestHandler::WriteBatchScript() -{ - this->Script = this->CTest->GetBinaryDir() + "/Testing/CTestBatch.txt"; - cmsys::ofstream fout; - fout.open(this->Script.c_str()); - fout << "#!/bin/sh\n"; - - for (auto const& t : this->Tests) { - this->WriteSrunArgs(t.first, fout); - this->WriteTestCommand(t.first, fout); - fout << "\n"; - } - fout.flush(); - fout.close(); -} - -void cmCTestBatchTestHandler::WriteSrunArgs(int test, std::ostream& fout) -{ - cmCTestTestHandler::cmCTestTestProperties* properties = - this->Properties[test]; - - fout << "srun "; - // fout << "--jobid=" << test << " "; - fout << "-J=" << properties->Name << " "; - - // Write dependency information - /*if(!this->Tests[test].empty()) - { - fout << "-P=afterany"; - for(TestSet::iterator i = this->Tests[test].begin(); - i != this->Tests[test].end(); ++i) - { - fout << ":" << *i; - } - fout << " "; - }*/ - if (properties->RunSerial) { - fout << "--exclusive "; - } - if (properties->Processors > 1) { - fout << "-n" << properties->Processors << " "; - } -} - -void cmCTestBatchTestHandler::WriteTestCommand(int test, std::ostream& fout) -{ - std::vector<std::string> args = this->Properties[test]->Args; - std::vector<std::string> processArgs; - std::string command; - - command = this->TestHandler->FindTheExecutable(args[1].c_str()); - command = cmSystemTools::ConvertToOutputPath(command.c_str()); - - // Prepends memcheck args to our command string if this is a memcheck - this->TestHandler->GenerateTestCommand(processArgs, test); - processArgs.push_back(command); - - for (std::string const& arg : processArgs) { - fout << arg << " "; - } - - std::vector<std::string>::iterator i = args.begin(); - ++i; // the test name - ++i; // the executable (command) - if (args.size() > 2) { - fout << "'"; - } - while (i != args.end()) { - fout << "\"" << *i << "\""; // args to the test executable - ++i; - - if (i == args.end() && args.size() > 2) { - fout << "'"; - } - fout << " "; - } - // TODO ZACH build TestResult.FullCommandLine - // this->TestResult.FullCommandLine = this->TestCommand; -} - -void cmCTestBatchTestHandler::SubmitBatchScript() -{ - cmProcess sbatch; - std::vector<std::string> args; - args.push_back(this->Script); - args.push_back("-o"); - args.push_back(this->CTest->GetBinaryDir() + "/Testing/CTestBatch.txt"); - - sbatch.SetCommand("sbatch"); - sbatch.SetCommandArguments(args); - /*if(sbatch.StartProcess()) - { - //success condition - } - else - { - //fail condition - }*/ -} diff --git a/Source/CTest/cmCTestBatchTestHandler.h b/Source/CTest/cmCTestBatchTestHandler.h deleted file mode 100644 index 42f87bd..0000000 --- a/Source/CTest/cmCTestBatchTestHandler.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef cmCTestBatchTestHandler_h -#define cmCTestBatchTestHandler_h - -#include "cmConfigure.h" // IWYU pragma: keep - -#include "cmCTestMultiProcessHandler.h" -#include "cmsys/FStream.hxx" -#include <string> - -/** \class cmCTestBatchTestHandler - * \brief run parallel ctest - * - * cmCTestBatchTestHandler - */ -class cmCTestBatchTestHandler : public cmCTestMultiProcessHandler -{ -public: - ~cmCTestBatchTestHandler() override; - void RunTests() override; - -protected: - void WriteBatchScript(); - void WriteSrunArgs(int test, std::ostream& fout); - void WriteTestCommand(int test, std::ostream& fout); - - void SubmitBatchScript(); - - std::string Script; -}; - -#endif diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx index 672087d..85d98d0 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.cxx +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -11,6 +11,7 @@ #include "cmsys/Process.h" #include <chrono> +#include <ratio> #include <stdlib.h> cmCTestBuildAndTestHandler::cmCTestBuildAndTestHandler() @@ -18,7 +19,7 @@ cmCTestBuildAndTestHandler::cmCTestBuildAndTestHandler() this->BuildTwoConfig = false; this->BuildNoClean = false; this->BuildNoCMake = false; - this->Timeout = 0; + this->Timeout = std::chrono::duration<double>::zero(); } void cmCTestBuildAndTestHandler::Initialize() @@ -224,10 +225,9 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) } for (std::string const& tar : this->BuildTargets) { std::chrono::duration<double> remainingTime = std::chrono::seconds(0); - if (this->Timeout > 0) { - remainingTime = std::chrono::duration<double>(this->Timeout) - - std::chrono::duration_cast<std::chrono::seconds>( - std::chrono::steady_clock::now() - clock_start); + if (this->Timeout > std::chrono::duration<double>::zero()) { + remainingTime = + this->Timeout - (std::chrono::steady_clock::now() - clock_start); if (remainingTime <= std::chrono::seconds(0)) { if (outstring) { *outstring = "--build-and-test timeout exceeded. "; @@ -324,10 +324,9 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) // how much time is remaining std::chrono::duration<double> remainingTime = std::chrono::seconds(0); - if (this->Timeout > 0) { - remainingTime = std::chrono::duration<double>(this->Timeout) - - std::chrono::duration_cast<std::chrono::seconds>( - std::chrono::steady_clock::now() - clock_start); + if (this->Timeout > std::chrono::duration<double>::zero()) { + remainingTime = + this->Timeout - (std::chrono::steady_clock::now() - clock_start); if (remainingTime <= std::chrono::seconds(0)) { if (outstring) { *outstring = "--build-and-test timeout exceeded. "; @@ -396,7 +395,7 @@ int cmCTestBuildAndTestHandler::ProcessCommandLineArguments( } if (currentArg.find("--test-timeout", 0) == 0 && idx < allArgs.size() - 1) { idx++; - this->Timeout = atof(allArgs[idx].c_str()); + this->Timeout = std::chrono::duration<double>(atof(allArgs[idx].c_str())); } if (currentArg == "--build-generator" && idx < allArgs.size() - 1) { idx++; diff --git a/Source/CTest/cmCTestBuildAndTestHandler.h b/Source/CTest/cmCTestBuildAndTestHandler.h index f19cb67..f8a9ed7 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.h +++ b/Source/CTest/cmCTestBuildAndTestHandler.h @@ -7,6 +7,7 @@ #include "cmCTestGenericHandler.h" +#include <chrono> #include <sstream> #include <stddef.h> #include <string> @@ -67,7 +68,7 @@ protected: std::vector<std::string> TestCommandArgs; std::vector<std::string> BuildTargets; bool BuildNoCMake; - double Timeout; + std::chrono::duration<double> Timeout; }; #endif diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 39b90d8..2a9fd72 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -11,7 +11,6 @@ #include "cmParseGTMCoverage.h" #include "cmParseJacocoCoverage.h" #include "cmParsePHPCoverage.h" -#include "cmProcess.h" #include "cmSystemTools.h" #include "cmWorkingDirectory.h" #include "cmXMLWriter.h" @@ -81,7 +80,7 @@ public: cmsysProcess_SetOption(this->Process, cmsysProcess_Option_HideWindow, 1); if (this->TimeOut >= std::chrono::duration<double>::zero()) { - cmsysProcess_SetTimeout(this->Process, this->TimeOut); + cmsysProcess_SetTimeout(this->Process, this->TimeOut.count()); } cmsysProcess_Execute(this->Process); this->PipeState = cmsysProcess_GetState(this->Process); diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 7013db3..dbdefae 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -1,9 +1,5 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#ifdef _WIN32 -/* windows.h defines min() and max() macros that interfere. */ -#define NOMINMAX -#endif #include "cmCTestRunTest.h" #include "cmCTest.h" @@ -265,11 +261,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) passed = this->TestResult.Status == cmCTestTestHandler::COMPLETED; char buf[1024]; - sprintf(buf, "%6.2f sec", - double(std::chrono::duration_cast<std::chrono::milliseconds>( - this->TestProcess->GetTotalTime()) - .count()) / - 1000.0); + sprintf(buf, "%6.2f sec", this->TestProcess->GetTotalTime().count()); cmCTestLog(this->CTest, HANDLER_OUTPUT, buf << "\n"); if (outputTestErrorsToConsole) { @@ -394,11 +386,7 @@ void cmCTestRunTest::ComputeWeightedCost() { double prev = static_cast<double>(this->TestProperties->PreviousRuns); double avgcost = static_cast<double>(this->TestProperties->Cost); - double current = - double(std::chrono::duration_cast<std::chrono::milliseconds>( - this->TestResult.ExecutionTime) - .count()) / - 1000.0; + double current = this->TestResult.ExecutionTime.count(); if (this->TestResult.Status == cmCTestTestHandler::COMPLETED) { this->TestProperties->Cost = @@ -690,7 +678,7 @@ bool cmCTestRunTest::ForkProcess(std::chrono::duration<double> testTimeOut, // determine how much time we have std::chrono::duration<double> timeout = this->CTest->GetRemainingTimeAllowed(); - if (timeout != std::chrono::duration<double>::max()) { + if (timeout != cmCTest::MaxDuration()) { timeout -= std::chrono::minutes(2); } if (this->CTest->GetTimeOut() > std::chrono::duration<double>::zero() && @@ -714,7 +702,7 @@ bool cmCTestRunTest::ForkProcess(std::chrono::duration<double> testTimeOut, this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index << ": " << "Test timeout computed to be: " - << (timeout == std::chrono::duration<double>::max() + << (timeout == cmCTest::MaxDuration() ? std::string("infinite") : std::to_string( std::chrono::duration_cast<std::chrono::seconds>(timeout) diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 922f5c7..716ea10 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -1,12 +1,5 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ - -#ifdef _WIN32 -/* windows.h defines min() and max() macros, unless told to otherwise. This - * interferes with std::min() and std::max() at the very least. */ -#define NOMINMAX -#endif - #include "cmCTestScriptHandler.h" #include "cmsys/Directory.hxx" @@ -970,13 +963,13 @@ bool cmCTestScriptHandler::TryToRemoveBinaryDirectoryOnce( std::chrono::duration<double> cmCTestScriptHandler::GetRemainingTimeAllowed() { if (!this->Makefile) { - return std::chrono::duration<double>::max(); + return cmCTest::MaxDuration(); } const char* timelimitS = this->Makefile->GetDefinition("CTEST_TIME_LIMIT"); if (!timelimitS) { - return std::chrono::duration<double>::max(); + return cmCTest::MaxDuration(); } auto timelimit = std::chrono::duration<double>(atof(timelimitS)); diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 1e15cc5..4c7cefb 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -19,7 +19,6 @@ #include "cmAlgorithms.h" #include "cmCTest.h" -#include "cmCTestBatchTestHandler.h" #include "cmCTestMultiProcessHandler.h" #include "cmCommand.h" #include "cmGeneratedFileStream.h" @@ -540,10 +539,8 @@ int cmCTestTestHandler::ProcessHandler() this->PrintLabelOrSubprojectSummary(false); } char realBuf[1024]; - auto durationInMs = std::chrono::duration_cast<std::chrono::milliseconds>( - clock_finish - clock_start) - .count(); - sprintf(realBuf, "%6.2f sec", static_cast<double>(durationInMs) / 1000.0); + std::chrono::duration<double> durationInSecs = clock_finish - clock_start; + sprintf(realBuf, "%6.2f sec", durationInSecs.count()); cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\nTotal Test time (real) = " << realBuf << "\n", this->Quiet); @@ -654,10 +651,7 @@ void cmCTestTestHandler::PrintLabelOrSubprojectSummary(bool doSubProject) // only use labels found in labels if (labels.find(l) != labels.end()) { labelTimes[l] += - double(std::chrono::duration_cast<std::chrono::milliseconds>( - result.ExecutionTime) - .count()) / - 1000.0 * result.Properties->Processors; + result.ExecutionTime.count() * result.Properties->Processors; ++labelCounts[l]; } } @@ -1210,9 +1204,7 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<std::string>& passed, this->StartTestTime = std::chrono::system_clock::now(); auto elapsed_time_start = std::chrono::steady_clock::now(); - cmCTestMultiProcessHandler* parallel = this->CTest->GetBatchJobs() - ? new cmCTestBatchTestHandler - : new cmCTestMultiProcessHandler; + cmCTestMultiProcessHandler* parallel = new cmCTestMultiProcessHandler; parallel->SetCTest(this->CTest); parallel->SetParallelLevel(this->CTest->GetParallelLevel()); parallel->SetTestHandler(this); @@ -1327,11 +1319,7 @@ void cmCTestTestHandler::GenerateDartOutput(cmXMLWriter& xml) xml.StartElement("NamedMeasurement"); xml.Attribute("type", "numeric/double"); xml.Attribute("name", "Execution Time"); - xml.Element("Value", - double(std::chrono::duration_cast<std::chrono::milliseconds>( - result.ExecutionTime) - .count()) / - 1000.0); + xml.Element("Value", result.ExecutionTime.count()); xml.EndElement(); // NamedMeasurement if (!result.Reason.empty()) { const char* reasonType = "Pass Reason"; diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index 19b345e..4fb067a 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -29,7 +29,6 @@ class cmCTestTestHandler : public cmCTestGenericHandler { friend class cmCTestRunTest; friend class cmCTestMultiProcessHandler; - friend class cmCTestBatchTestHandler; public: typedef cmCTestGenericHandler Superclass; diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index 69ffb33..0db66c3 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -5,16 +5,6 @@ #include "cmProcessOutput.h" #include <iostream> -void cmsysProcess_SetTimeout(cmsysProcess* process, - std::chrono::duration<double> timeout) -{ - cmsysProcess_SetTimeout( - process, - double( - std::chrono::duration_cast<std::chrono::milliseconds>(timeout).count()) / - 1000.0); -}; - cmProcess::cmProcess() { this->Process = nullptr; @@ -59,7 +49,7 @@ bool cmProcess::StartProcess() cmsysProcess_SetWorkingDirectory(this->Process, this->WorkingDirectory.c_str()); } - cmsysProcess_SetTimeout(this->Process, this->Timeout); + cmsysProcess_SetTimeout(this->Process, this->Timeout.count()); cmsysProcess_SetOption(this->Process, cmsysProcess_Option_MergeOutput, 1); cmsysProcess_Execute(this->Process); return (cmsysProcess_GetState(this->Process) == @@ -115,10 +105,7 @@ int cmProcess::GetNextOutputLine(std::string& line, { cmProcessOutput processOutput(cmProcessOutput::UTF8); std::string strdata; - double waitTimeout = - double( - std::chrono::duration_cast<std::chrono::milliseconds>(timeout).count()) / - 1000.0; + double waitTimeout = timeout.count(); for (;;) { // Look for lines already buffered. if (this->Output.GetLine(line)) { @@ -240,7 +227,7 @@ int cmProcess::ReportStatus() void cmProcess::ChangeTimeout(std::chrono::duration<double> t) { this->Timeout = t; - cmsysProcess_SetTimeout(this->Process, this->Timeout); + cmsysProcess_SetTimeout(this->Process, this->Timeout.count()); } void cmProcess::ResetStartTime() diff --git a/Source/CTest/cmProcess.h b/Source/CTest/cmProcess.h index cbb611d..f3b0bd7 100644 --- a/Source/CTest/cmProcess.h +++ b/Source/CTest/cmProcess.h @@ -10,13 +10,6 @@ #include <string> #include <vector> -/* - * A wrapper function for cmsysProcess_SetTimeout that takes an - * std::chrono::duration. For convenience only. - */ -void cmsysProcess_SetTimeout(cmsysProcess* process, - std::chrono::duration<double> timeout); - /** \class cmProcess * \brief run a process with c++ * diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index a4ca301..26e1dcb 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1,11 +1,5 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#ifdef _WIN32 -/* windows.h defines min() and max() macros by default. This interferes with - * C++ functions names. - */ -#define NOMINMAX -#endif #include "cmCTest.h" #include "cm_curl.h" @@ -50,7 +44,6 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmProcess.h" #include "cmProcessOutput.h" #include "cmState.h" #include "cmStateSnapshot.h" @@ -267,7 +260,6 @@ cmCTest::cmCTest() this->TestLoad = 0; this->SubmitIndex = 0; this->Failover = false; - this->BatchJobs = false; this->ForceNewCTestProcess = false; this->TomorrowTag = false; this->Verbose = false; @@ -998,7 +990,7 @@ int cmCTest::RunMakeCommand(const char* command, std::string& output, cmsysProcess_SetCommand(cp, &*argv.begin()); cmsysProcess_SetWorkingDirectory(cp, dir); cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1); - cmsysProcess_SetTimeout(cp, timeout); + cmsysProcess_SetTimeout(cp, timeout.count()); cmsysProcess_Execute(cp); // Initialize tick's @@ -1089,9 +1081,10 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output, bool modifyEnv = (environment && !environment->empty()); // determine how much time we have - std::chrono::duration<double> timeout = - std::min<std::chrono::duration<double>>(this->GetRemainingTimeAllowed(), - std::chrono::minutes(2)); + std::chrono::duration<double> timeout = this->GetRemainingTimeAllowed(); + if (timeout != cmCTest::MaxDuration()) { + timeout -= std::chrono::minutes(2); + } if (this->TimeOut > std::chrono::duration<double>::zero() && this->TimeOut < timeout) { timeout = this->TimeOut; @@ -1107,7 +1100,7 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output, } cmCTestLog( this, HANDLER_VERBOSE_OUTPUT, "Test timeout computed to be: " - << (timeout == std::chrono::duration<double>::max() + << (timeout == cmCTest::MaxDuration() ? std::string("infinite") : std::to_string( std::chrono::duration_cast<std::chrono::seconds>(timeout) @@ -1130,6 +1123,7 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output, // invocations. Since --build-generator is required this is a // good place to check for it, and to add the arguments in if (strcmp(i, "--build-generator") == 0 && + timeout != cmCTest::MaxDuration() && timeout > std::chrono::duration<double>::zero()) { args.push_back("--test-timeout"); std::ostringstream msg; @@ -1184,7 +1178,7 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output, cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1); } - cmsysProcess_SetTimeout(cp, timeout); + cmsysProcess_SetTimeout(cp, timeout.count()); cmsysProcess_Execute(cp); char* data; @@ -1819,9 +1813,6 @@ bool cmCTest::HandleCommandLineArguments(size_t& i, if (this->CheckArgument(arg, "-V", "--verbose")) { this->Verbose = true; } - if (this->CheckArgument(arg, "-B")) { - this->BatchJobs = true; - } if (this->CheckArgument(arg, "-VV", "--extra-verbose")) { this->ExtraVerbose = true; this->Verbose = true; @@ -2608,7 +2599,7 @@ bool cmCTest::RunCommand(std::vector<std::string> const& args, if (cmSystemTools::GetRunCommandHideConsole()) { cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1); } - cmsysProcess_SetTimeout(cp, timeout); + cmsysProcess_SetTimeout(cp, timeout.count()); cmsysProcess_Execute(cp); std::vector<char> tempOutput; @@ -2804,7 +2795,7 @@ void cmCTest::Log(int logType, const char* file, int line, const char* msg, std::chrono::duration<double> cmCTest::GetRemainingTimeAllowed() { if (!this->GetHandler("script")) { - return std::chrono::duration<double>::max(); + return cmCTest::MaxDuration(); } cmCTestScriptHandler* ch = @@ -2813,6 +2804,11 @@ std::chrono::duration<double> cmCTest::GetRemainingTimeAllowed() return ch->GetRemainingTimeAllowed(); } +std::chrono::duration<double> cmCTest::MaxDuration() +{ + return std::chrono::duration<double>(1.0e7); +} + void cmCTest::OutputTestErrors(std::vector<char> const& process_output) { std::string test_outputs("\n*** Test Failed:\n"); diff --git a/Source/cmCTest.h b/Source/cmCTest.h index ba94866..23d71cb 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -208,6 +208,8 @@ public: */ std::chrono::duration<double> GetRemainingTimeAllowed(); + static std::chrono::duration<double> MaxDuration(); + /** * Open file in the output directory and set the stream */ @@ -427,9 +429,6 @@ public: void SetFailover(bool failover) { this->Failover = failover; } bool GetFailover() { return this->Failover; } - void SetBatchJobs(bool batch = true) { this->BatchJobs = batch; } - bool GetBatchJobs() { return this->BatchJobs; } - bool GetVerbose() { return this->Verbose; } bool GetExtraVerbose() { return this->ExtraVerbose; } @@ -475,7 +474,6 @@ private: bool UseHTTP10; bool PrintLabels; bool Failover; - bool BatchJobs; bool ForceNewCTestProcess; diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index dd2993d..e684f5e 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -29,6 +29,22 @@ enum LinkLibraryScopeType const char* const GRAPHVIZ_PRIVATE_EDEGE_STYLE = "dashed"; const char* const GRAPHVIZ_INTERFACE_EDEGE_STYLE = "dotted"; +std::string getLinkLibraryStyle(const LinkLibraryScopeType& type) +{ + std::string style; + switch (type) { + case LLT_SCOPE_PRIVATE: + style = "[style = " + std::string(GRAPHVIZ_PRIVATE_EDEGE_STYLE) + "]"; + break; + case LLT_SCOPE_INTERFACE: + style = "[style = " + std::string(GRAPHVIZ_INTERFACE_EDEGE_STYLE) + "]"; + break; + default: + break; + } + return style; +} + const char* getShapeForTarget(const cmGeneratorTarget* target) { if (!target) { @@ -132,6 +148,7 @@ cmGraphVizWriter::cmGraphVizWriter( , GenerateForStaticLibs(true) , GenerateForSharedLibs(true) , GenerateForModuleLibs(true) + , GenerateForInterface(true) , GenerateForExternals(true) , GeneratePerTarget(true) , GenerateDependers(true) @@ -192,6 +209,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, __set_bool_if_set(this->GenerateForStaticLibs, "GRAPHVIZ_STATIC_LIBS"); __set_bool_if_set(this->GenerateForSharedLibs, "GRAPHVIZ_SHARED_LIBS"); __set_bool_if_set(this->GenerateForModuleLibs, "GRAPHVIZ_MODULE_LIBS"); + __set_bool_if_set(this->GenerateForInterface, "GRAPHVIZ_INTERFACE"); __set_bool_if_set(this->GenerateForExternals, "GRAPHVIZ_EXTERNAL_LIBS"); __set_bool_if_set(this->GeneratePerTarget, "GRAPHVIZ_GENERATE_PER_TARGET"); __set_bool_if_set(this->GenerateDependers, "GRAPHVIZ_GENERATE_DEPENDERS"); @@ -379,16 +397,7 @@ void cmGraphVizWriter::WriteConnections( str << " \"" << myNodeName << "\" -> \"" << libNameIt->second << "\""; - switch (llit.second) { - case LLT_SCOPE_PRIVATE: - str << "[style = " << GRAPHVIZ_PRIVATE_EDEGE_STYLE << "]"; - break; - case LLT_SCOPE_INTERFACE: - str << "[style = " << GRAPHVIZ_INTERFACE_EDEGE_STYLE << "]"; - break; - default: - break; - } + str << getLinkLibraryStyle(llit.second); str << " // " << targetName << " -> " << libName << std::endl; this->WriteConnections(libName, insertedNodes, insertedConnections, str); @@ -429,12 +438,11 @@ void cmGraphVizWriter::WriteDependerConnections( // Now we have a target, check whether it links against targetName. // If so, draw a connection, and then continue with dependers on that one. - const cmTarget::LinkLibraryVectorType* ll = - &(tptr.second->Target->GetOriginalLinkLibraries()); + std::map<std::string, LinkLibraryScopeType> ll = + getScopedLinkLibrariesFromTarget(tptr.second->Target); - for (auto const& llit : *ll) { - std::string libName = llit.first; - if (libName == targetName) { + for (auto const& llit : ll) { + if (llit.first == targetName) { // So this target links against targetName. std::map<std::string, std::string>::const_iterator dependerNodeNameIt = this->TargetNamesNodes.find(tptr.first); @@ -452,6 +460,7 @@ void cmGraphVizWriter::WriteDependerConnections( str << " \"" << dependerNodeNameIt->second << "\" -> \"" << myNodeName << "\""; str << " // " << targetName << " -> " << tptr.first << std::endl; + str << getLinkLibraryStyle(llit.second); this->WriteDependerConnections(tptr.first, insertedNodes, insertedConnections, str); } @@ -572,6 +581,8 @@ bool cmGraphVizWriter::GenerateForTargetType( return this->GenerateForSharedLibs; case cmStateEnums::MODULE_LIBRARY: return this->GenerateForModuleLibs; + case cmStateEnums::INTERFACE_LIBRARY: + return this->GenerateForInterface; default: break; } diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h index 824999b..ac20da9 100644 --- a/Source/cmGraphVizWriter.h +++ b/Source/cmGraphVizWriter.h @@ -79,6 +79,7 @@ protected: bool GenerateForStaticLibs; bool GenerateForSharedLibs; bool GenerateForModuleLibs; + bool GenerateForInterface; bool GenerateForExternals; bool GeneratePerTarget; bool GenerateDependers; diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx index 5e872d2..4b59f44 100644 --- a/Source/cmIDEOptions.cxx +++ b/Source/cmIDEOptions.cxx @@ -155,12 +155,12 @@ std::vector<std::string> const& cmIDEOptions::GetDefines() const return this->Defines; } -void cmIDEOptions::AddFlag(const char* flag, const char* value) +void cmIDEOptions::AddFlag(std::string const& flag, std::string const& value) { this->FlagMap[flag] = value; } -void cmIDEOptions::AddFlag(const char* flag, +void cmIDEOptions::AddFlag(std::string const& flag, std::vector<std::string> const& value) { this->FlagMap[flag] = value; @@ -185,7 +185,7 @@ void cmIDEOptions::AppendFlagString(std::string const& flag, this->FlagMap[flag].append_with_space(value); } -void cmIDEOptions::RemoveFlag(const char* flag) +void cmIDEOptions::RemoveFlag(std::string const& flag) { this->FlagMap.erase(flag); } @@ -195,12 +195,13 @@ bool cmIDEOptions::HasFlag(std::string const& flag) const return this->FlagMap.find(flag) != this->FlagMap.end(); } -const char* cmIDEOptions::GetFlag(const char* flag) +const char* cmIDEOptions::GetFlag(std::string const& flag) const { // This method works only for single-valued flags! - std::map<std::string, FlagValue>::iterator i = this->FlagMap.find(flag); - if (i != this->FlagMap.end() && i->second.size() == 1) { + std::map<std::string, FlagValue>::const_iterator i = + this->FlagMap.find(flag); + if (i != this->FlagMap.cend() && i->second.size() == 1) { return i->second[0].c_str(); } - return 0; + return nullptr; } diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h index af03128..ded92ca 100644 --- a/Source/cmIDEOptions.h +++ b/Source/cmIDEOptions.h @@ -26,15 +26,15 @@ public: void AddDefines(const std::vector<std::string>& defines); std::vector<std::string> const& GetDefines() const; - void AddFlag(const char* flag, const char* value); - void AddFlag(const char* flag, std::vector<std::string> const& value); + void AddFlag(std::string const& flag, std::string const& value); + void AddFlag(std::string const& flag, std::vector<std::string> const& value); void AppendFlag(std::string const& flag, std::string const& value); void AppendFlag(std::string const& flag, std::vector<std::string> const& value); void AppendFlagString(std::string const& flag, std::string const& value); - void RemoveFlag(const char* flag); + void RemoveFlag(std::string const& flag); bool HasFlag(std::string const& flag) const; - const char* GetFlag(const char* flag); + const char* GetFlag(std::string const& flag) const; protected: // create a map of xml tags to the values they should have in the output diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 4121190..1b96ef4 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -701,7 +701,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( Options targetOptions(this, t, table, gg->ExtraFlagTable); targetOptions.FixExceptionHandlingDefault(); std::string asmLocation = configName + "/"; - targetOptions.AddFlag("AssemblerListingLocation", asmLocation.c_str()); + targetOptions.AddFlag("AssemblerListingLocation", asmLocation); targetOptions.Parse(flags.c_str()); targetOptions.Parse(defineFlags.c_str()); targetOptions.ParseFinish(); @@ -1007,7 +1007,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( if (mdi && !mdi->DefFile.empty()) { std::string defFile = this->ConvertToOutputFormat(mdi->DefFile, cmOutputConverter::SHELL); - linkOptions.AddFlag("ModuleDefinitionFile", defFile.c_str()); + linkOptions.AddFlag("ModuleDefinitionFile", defFile); } switch (target->GetType()) { diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 2af3a0f..9154dca 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2450,7 +2450,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( clOptions.FixExceptionHandlingDefault(); clOptions.AddFlag("PrecompiledHeader", "NotUsing"); std::string asmLocation = configName + "/"; - clOptions.AddFlag("AssemblerListingLocation", asmLocation.c_str()); + clOptions.AddFlag("AssemblerListingLocation", asmLocation); } } clOptions.Parse(flags.c_str()); @@ -3317,8 +3317,8 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( imLib += "/"; imLib += targetNameImport; - linkOptions.AddFlag("ImportLibrary", imLib.c_str()); - linkOptions.AddFlag("ProgramDataBaseFile", pdb.c_str()); + linkOptions.AddFlag("ImportLibrary", imLib); + linkOptions.AddFlag("ProgramDataBaseFile", pdb); // A Windows Runtime component uses internal .NET metadata, // so does not have an import library. @@ -3339,7 +3339,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( linkOptions.AppendFlag("IgnoreSpecificDefaultLibraries", "ole32.lib"); } } else if (this->NsightTegra) { - linkOptions.AddFlag("SoName", targetNameSO.c_str()); + linkOptions.AddFlag("SoName", targetNameSO); } linkOptions.Parse(flags.c_str()); diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index b1686be..4f3d737 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -258,7 +258,7 @@ void cmVisualStudioGeneratorOptions::FixCudaCodeGeneration() void cmVisualStudioGeneratorOptions::FixManifestUACFlags() { - static const char* ENABLE_UAC = "EnableUAC"; + static std::string const ENABLE_UAC = "EnableUAC"; if (!HasFlag(ENABLE_UAC)) { return; } @@ -304,8 +304,7 @@ void cmVisualStudioGeneratorOptions::FixManifestUACFlags() continue; } - AddFlag(uacMap[keyValue[0]].c_str(), - uacExecuteLevelMap[keyValue[1]].c_str()); + AddFlag(uacMap[keyValue[0]], uacExecuteLevelMap[keyValue[1]]); continue; } @@ -314,7 +313,7 @@ void cmVisualStudioGeneratorOptions::FixManifestUACFlags() // unknown uiAccess value continue; } - AddFlag(uacMap[keyValue[0]].c_str(), keyValue[1].c_str()); + AddFlag(uacMap[keyValue[0]], keyValue[1]); continue; } diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index 64b6484..351e38d 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -705,9 +705,13 @@ ENDIF() # selected components. Initialize with required components. SET(KWSYS_CLASSES) SET(KWSYS_H_FILES Configure SharedForward) -SET(KWSYS_HXX_FILES Configure String - hashtable hash_fun hash_map hash_set - ) +SET(KWSYS_HXX_FILES Configure String) + +IF(NOT CMake_SOURCE_DIR) + SET(KWSYS_HXX_FILES ${KWSYS_HXX_FILES} + hashtable hash_fun hash_map hash_set + ) +ENDIF() # Add selected C++ classes. SET(cppclasses @@ -1027,7 +1031,7 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) ENDFOREACH() # C++ tests - IF(NOT WATCOM) + IF(NOT WATCOM AND NOT CMake_SOURCE_DIR) SET(KWSYS_CXX_TESTS testHashSTL ) diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 50aa857..649f30b 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -4234,11 +4234,16 @@ bool SystemTools::IsSubDirectory(const std::string& cSubdir, std::string dir = cDir; SystemTools::ConvertToUnixSlashes(subdir); SystemTools::ConvertToUnixSlashes(dir); - if (subdir.size() > dir.size() && subdir[dir.size()] == '/') { - std::string s = subdir.substr(0, dir.size()); - return SystemTools::ComparePath(s, dir); + if (subdir.size() <= dir.size() || dir.empty()) { + return false; } - return false; + bool isRootPath = *dir.rbegin() == '/'; // like "/" or "C:/" + size_t expectedSlashPosition = isRootPath ? dir.size() - 1u : dir.size(); + if (subdir[expectedSlashPosition] != '/') { + return false; + } + std::string s = subdir.substr(0, dir.size()); + return SystemTools::ComparePath(s, dir); } void SystemTools::Delay(unsigned int msec) diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx index 3b694c9..a6af9cc 100644 --- a/Source/kwsys/testSystemTools.cxx +++ b/Source/kwsys/testSystemTools.cxx @@ -813,6 +813,39 @@ static bool CheckFind() return res; } +static bool CheckIsSubDirectory() +{ + bool res = true; + + if (kwsys::SystemTools::IsSubDirectory("/foo", "/") == false) { + std::cerr << "Problem with IsSubDirectory (root - unix): " << std::endl; + res = false; + } + if (kwsys::SystemTools::IsSubDirectory("c:/foo", "c:/") == false) { + std::cerr << "Problem with IsSubDirectory (root - dos): " << std::endl; + res = false; + } + if (kwsys::SystemTools::IsSubDirectory("/foo/bar", "/foo") == false) { + std::cerr << "Problem with IsSubDirectory (deep): " << std::endl; + res = false; + } + if (kwsys::SystemTools::IsSubDirectory("/foo", "/foo") == true) { + std::cerr << "Problem with IsSubDirectory (identity): " << std::endl; + res = false; + } + if (kwsys::SystemTools::IsSubDirectory("/fooo", "/foo") == true) { + std::cerr << "Problem with IsSubDirectory (substring): " << std::endl; + res = false; + } + if (kwsys::SystemTools::IsSubDirectory("/foo/", "/foo") == true) { + std::cerr << "Problem with IsSubDirectory (prepended slash): " + << std::endl; + res = false; + } + + return res; +} + static bool CheckGetLineFromStream() { const std::string fileWithFiveCharsOnFirstLine(TEST_SYSTEMTOOLS_SOURCE_DIR @@ -897,6 +930,8 @@ int testSystemTools(int, char* []) res &= CheckFind(); + res &= CheckIsSubDirectory(); + res &= CheckGetLineFromStream(); res &= CheckGetFilenameName(); diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 9507880..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 @@ -3069,8 +2968,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release add_test(CTestTestShowOnly ${CMAKE_CTEST_COMMAND} -N) - add_test(CTestBatchTest ${CMAKE_CTEST_COMMAND} -B) - configure_file( "${CMake_SOURCE_DIR}/Tests/CTestTestFdSetSize/test.cmake.in" "${CMake_BINARY_DIR}/Tests/CTestTestFdSetSize/test.cmake" 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) |