summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Skip Qt*Autogen.MocSkipSource case for Xcode "new build system"Brad King2020-09-181-0/+7
| | | | | | | | | This test case enables AUTOMOC on the same sources in two separate targets. This causes the `moc_*.cpp` generation custom commands to be added to multiple `_autogen` targets, which is not allowed by the Xcode "new build system". Skip the part of the test that triggers this problem for now. Issue: #21205
* Tests: Avoid duplicate custom commands in QtAutogen.AutogenOriginDependsOffBrad King2020-09-183-6/+11
|
* AutoMoc: Re-run moc if a dependency is missingJoerg Bornemann2020-09-098-0/+117
| | | | | | | | | | | | | | | | | | | | | AutoMoc uses the moc-emitted dependency file of Qt 5.15 to track dependencies. Such a dependency may well live outside the project and can vanish, for example when installing a new compiler version. This situation was detected before, but merely a warning was issued. Now, we're considering a generated file as out of date if a dependency is missing and re-generate it. We also have to remove the missing dependency from the ParseCache. Otherwise the AUTOMOC target for all generators other than Ninja will always be out of date. The ParseCacheChanged flag had to be made atomic, because we're potentially accessing it from multiple threads. The dependencies vector itself is not vulnerable in this regard, because there's one vector per file, and we're accessing exactly one ParseCacheT::FileHandleT per thread. Fixes: #21136
* Merge branch 'backport-3.17-automoc-depend-project-file'Brad King2020-08-317-0/+146
|\
| * AutoMoc: Restore support for re-running after project file changesJoerg Bornemann2020-08-317-0/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Qt >= 5.15.0 and Ninja generators AutoMoc creates a depfile to let Ninja decide when to run AutoMoc. This was introduced by commit aebfbcaa46 (AutoGen: Use depfiles for the XXX_autogen ninja targets, 2020-01-14, v3.17.0-rc1~58^2). However, AutoMoc was not triggered after adding a new moc-able file to the project. This patch adds the project file (and potentially included files) to the dependencies in the depfile. Now, a re-run of AutoMoc is triggered if the project file changes. Fixes: #21127
* | Merge branch 'backport-3.17-automoc-path-prefix-off'Brad King2020-08-101-0/+1
|\ \ | |/
| * Merge branch 'backport-3.16-automoc-path-prefix-off'Brad King2020-08-101-0/+1
| |\
| | * Autogen: Turn off moc path prefix generation by defaultJoerg Bornemann2020-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the default value of `CMAKE_AUTOMOC_PATH_PREFIX` to `OFF` to restore compatibility with behavior of CMake 3.15 and below. C++ source files that are generated by Qt's meta object compiler (moc) include the header file that was passed as input argument to moc. This is usually a path relative to the source directory, for example #include "../../source/dir/myobject.h" That is problematic for reproducible builds as described in #18815. To cope with that, the target property AUTOMOC_PATH_PREFIX was introduced in CMake 3.16 by commit d018d27c10 (Autogen: Add moc path prefix generation (AUTOMOC_PATH_PREFIX), 2019-09-13, v3.16.0-rc1~94^2~4). The property is default-initialized from the variable `CMAKE_AUTOMOC_PATH_PREFIX`, which defaults to `ON`. If this property is ON, and myobject.h is located in an include directory of the target, moc-generated C++ files include the file without the "path prefix": #include "myobject.h" This behavior, however, can break projects that have equally named header files in different include directories. As "not breaking existing projects" trumps "have reproducible builds by default" we change the default of `CMAKE_AUTOMOC_PATH_PREFIX` to `OFF`. Also, it is now possible to pass `-DCMAKE_AUTOMOC_PATH_PREFIX=ON` on the CMake command line. Before, it was overridden in `CMakeGenericSystem`. Fixes: #20598 Issue: #18815
* | | Unity Builds: Do not set SKIP_AUTOGEN to source filesCristian Adam2020-07-294-0/+23
| | | | | | | | | | | | Fixes: #21028
* | | Update links to gitlab.kitware.com repos to add `-/`Brad King2020-05-261-2/+2
| | | | | | | | | | | | | | | | | | GitLab now uses a `/-/` component between the `group/project` part of the URL and the `{issues,merge_requests,tree}` part so that it can support `group/subgroup/project` with arbitrary depth.
* | | Tests: Update QtAutogen codeeditor test only include headers neededRobert Maynard2020-05-211-1/+4
|/ /
* | AutoGen: Use moc's feature to output dependenciesJoerg Bornemann2020-01-286-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt version 5.15.0 moc learned to output the dependencies of the generated file. This commit enhances JobCompileMocT to read the dependency file written by moc. The dependencies are stored in the same cache that's used for the dependencies determined by dependency filters. The dependency filter functionality is turned off if moc's dependency output feature is used. Fixes: #17750 Fixes: #19058
* | Tests: Add AUTOGEN policy CMP0100 testSebastian Holtermann2020-01-049-0/+162
| | | | | | | | | | Add a test for policy CMP0100 that configures whether or not AUTOMOC and AUTOUIC should process .hh header files.
* | Tests: Restore Autogen/SameName .hh header testSebastian Holtermann2020-01-043-1/+20
|/ | | | | | | | In commit 7fa7f55230fda5ac0135b1f4a220c15ad5983857, the Autogen/SameName test was changed to not test .hh header file processing in AUTOGEN anymore, because we had to revert that feature. Since we now support .hh header file processing in AUTOMOC again, we can restore the Autogen/SameName test for that.
* Autogen: Revert processing of .hh files for compatibilityBrad King2019-12-183-16/+0
| | | | | | | | | | Since commit 4a9154537c (Autogen: Use cmake::IsHeader/SourceExtension for file type detection, 2019-07-02, v3.16.0-rc1~470^2~4) we process `.hh` files with `AUTOMOC`. However, this change can break existing projects that do not expect the behavior. Revert it for now. It can be restored later via a policy. Fixes: #20101
* Revise include order using clang-format-6.0Kitware Robot2019-10-0151-33/+79
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* Tests: At QtAutogen.MocIncludeSymlink testSebastian Holtermann2019-09-182-0/+81
|
* Tests: Merge QtAutogen.MocIncludeStrict and MocIncludeRelaxedSebastian Holtermann2019-09-1897-896/+1011
|
* Tests: Autogen: Extend SameName test with additional header extensionsSebastian Holtermann2019-07-044-0/+32
| | | | | This adds additional headers with suffixes ".hh" and uppercase ".H" to the QtAutogen/SameName test.
* Tests: Autogen: Use valid rcc compression levelsSebastian Holtermann2019-07-011-4/+4
| | | | | Avoid the invalid compression level 0 when invoking rcc. It let's rcc fail with an error since Qt 5.13.
* Autogen: Add ManySources testSebastian Holtermann2019-04-158-0/+131
| | | | | | | The QtAutogen/ManySources test generates a number of source, header, .ui and .qrc files that get AUTOMOC, AUTOUIC and AUTORCC processed. This stresses the concurrency framework in `cmQtAutoMocUic` and should reveal any issues with that.
* Tests: Fix Qt*Autogen.GlobalAutogenTarget to use matching generatorBrad King2019-04-101-0/+3
| | | | | | Build the GAT project with the same generator as the rest of the test. This was accidentally left out of commit 8c8731b422 (Autogen: Add test for CMAKE_GLOBAL_AUTOGEN/RCC_TARGET, 2018-11-11, v3.14.0-rc1~396^2~2).
* Autogen: Fix RerunMocPlugin test for Ninja generatorSebastian Holtermann2019-02-151-11/+4
|
* Autogen: Refactor RerunRccDepends test with fixed timestamp comparisonSebastian Holtermann2019-02-131-80/+95
| | | | | | | This refactors and simplifies the QtAutogen.RerunRccDepends test. Repetitive task are packed into macros. By using version strings to store file timestamps, timestamp comparison becomes more reliable. Test status and error messages are improved.
* Autogen: Refactor RerunRccConfigChange testSebastian Holtermann2019-02-131-14/+19
| | | | | | This refactors and simplifies the QtAutogen.RerunRccConfigChange test. Repetitive task are packed into macros. Test status and error messages are improved.
* Autogen: Refactor RerunMocBasic test with fixed timestamp comparisonSebastian Holtermann2019-02-131-31/+67
| | | | | | | This refactors and simplifies the QtAutogen.RerunMocBasic test. Repetitive task are packed into macros. By using version strings to store file timestamps, timestamp comparison becomes more reliable. Test status and error messages are improved.
* Autogen: Refactor RerunMocPlugin test with fixed timestamp comparisonSebastian Holtermann2019-02-131-58/+93
| | | | | | | This refactors and simplifies the QtAutogen.RerunMocPlugin test. Repetitive task are packed into macros. By using version strings to store file timestamps, timestamp comparison becomes more reliable. Test status and error messages are improved.
* Autogen: Extend the SameName test with same name but different extension filesSebastian Holtermann2019-02-056-1/+68
|
* Autogen: Reenable passing compiler implicit include directories to mocSebastian Holtermann2019-01-283-2/+11
| | | | | | | | | | | Since commit 5990ecb741 (Compute implicit include directories from compiler output, 2018-12-07) we now have compiler implicit include directory computation for gcc and clang. It should be safe now to pass these to `moc`. This patch re-enables passing the compiler implicit include directories to `moc`, which was disabled due to issue #18669. Fixes: #18041 Issue: #18669
* Autogen: Revert passing compiler implicit includes to mocSebastian Holtermann2018-12-071-1/+2
| | | | | | | | | Passing an incomplete list of compiler include directories causes a regression in the KIO project (and probably others). We need to disable it until the complete list is available (see #16291). Fixes: #18669 Issue: #18041
* Autogen: Add QtAutogen.UicNoGui testSebastian Holtermann2018-11-287-0/+50
| | | | | Adds a Qt core only test that has ``AUTOUIC`` enabled targets that don't link against QtXWidgets or Qt at all.
* Autogen: Tests: Differentiate between Qt core and Qt gui testsSebastian Holtermann2018-11-2843-46/+103
| | | | | | | | Some AUTOGEN tests require the Qt core libraries only and some require the Qt gui libraries to function. This replaces the AutogenTest.cmake script with two specific AutogenCoreTest.cmake and AutogenGuiTest.cmake scripts that are included on demand.
* Autogen: Sort testsSebastian Holtermann2018-11-141-36/+30
|
* Autogen: Add a definitions test to the MocOnly testSebastian Holtermann2018-11-142-1/+7
|
* Autogen: Add test for CMAKE_GLOBAL_AUTOGEN/RCC_TARGETSebastian Holtermann2018-11-1117-0/+279
|
* Autogen: Separate AUTOGEN_TARGET_DEPENDS tests into own tests suiteSebastian Holtermann2018-11-057-48/+70
| | | | | | The tests for AUTOGEN_TARGET_DEPENDS were part of the AutogenOriginDependsOn tests suite. This separates them into an own AutogenTargetDepends tests suite.
* Autogen: Rename MocDepends test to AutogenOriginDependsOnSebastian Holtermann2018-11-0312-2/+2
|
* Autogen: Add test for AUTOGEN_ORIGIN_DEPENDS=OFFSebastian Holtermann2018-11-0312-0/+238
|
* Fix misc. typosluz.paz2018-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via `codespell -q 3 -I ../cmake-whitelist.txt --skip="./Utilities"` where the whitelist consists of ``` aci ans behaviour buil convertor dum earch ect emmited emmitted helpfull iff isnt ith lowercased mose nd nknown nto objext ot pathes pevents splitted substract superceded supercedes te tim todays uint upto whitespaces ```
* Autogen: Tests: Use non inverting Qt version testsSebastian Holtermann2018-08-096-11/+11
|
* Autogen: Check if we can run the MocOsMacros testSebastian Holtermann2018-08-072-9/+25
| | | | | | | | | | The MocOsMacros test requires moc to support moc_predefs.h on some platforms (e.g. Mac). moc supports moc_predefs.h inclusion since Qt 5.8, therefore run the MocOsMacros only if Qt >= 5.8 and if CMAKE_CXX_COMPILER_PREDEFINES_COMMAND is defined. Fixes #18245
* Autogen: Add test for Q_OS_ macrosSebastian Holtermann2018-07-305-0/+180
|
* Autogen: Enable CMAKE_AUTOGEN_VERBOSE in all testsSebastian Holtermann2018-06-215-0/+5
|
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-016-7/+10
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Autogen: Add AUTORCC configuration change testSebastian Holtermann2018-05-3011-0/+94
|
* Tests: Add QtAutogen test for a low cmake_minimum_required versionSebastian Holtermann2018-05-168-1/+92
|
* Cleanup: Fix typos and grammar in docs and codeCraig Scott2018-04-221-1/+1
| | | No functional changes, just docs, comments and error messages.
* Replaces execute_process calls to touch files with file(TOUCH) callsShane Parris2018-02-151-4/+2
|
* Autogen: Tests: Extend AUTOUIC include patterns testSebastian Holtermann2018-01-1911-46/+116
|
* Autogen: Tests: Extend AUTOMOC include patterns testSebastian Holtermann2018-01-186-2/+82
|