summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen
Commit message (Collapse)AuthorAgeFilesLines
* Autogen: Skip generated files for compatibility with CMake 3.8Brad King2017-07-072-0/+3
| | | | | | | | | | | | | | | | The change in commit v3.9.0-rc1~464^2~8 (Autogen: Add AUTOMOC/UIC support for generated source files, 2017-03-02) changes behavior of existing projects that may not expect `AUTOGEN` on generated files and do not yet set `SKIP_AUTOGEN` on them. Disable the behavior change for now to fix the regression for CMake 3.9. We can restore it later with a policy. In order to keep the implementation and tests working, add an undocumented property we can use in the tests to enable the behavior before the policy is introduced. Fixes: #17031 Issue: #16186
* Tests: Fix Qt5Autogen test on XcodeBrad King2017-05-302-4/+5
| | | | | | | Fix the `mocPlugin` project to provide `mocPlugin.xcodeproj` instead of `Project.xcodeproj` so that the `try_compile` project name matches. Also search in the `Debug` subdirectory of the `try_compile` build tree for the resulting binaries, to work with multi-config generators.
* Autogen: Tests: More rigorous rcc rebuild testsSebastian Holtermann2017-03-237-47/+93
| | | | Closes: #16103
* Autogen: Test: Add mocDepends testSebastian Holtermann2017-03-069-0/+119
|
* Autogen: Test: Add generated qrc file to rccDepends testSebastian Holtermann2017-03-066-9/+39
|
* Autogen: Test: Add generated file to moc rerun testSebastian Holtermann2017-03-065-18/+37
|
* Autogen: Test: Add timestamp comparison to moc rerun testSebastian Holtermann2017-03-063-15/+32
|
* Autogen: Test: Rename automoc_rerun test to mocRerunSebastian Holtermann2017-03-067-9/+9
|
* Autogen: Test: Rename autorcc_depends test to rccDependsSebastian Holtermann2017-03-065-8/+8
|
* Autogen: Add AUTOUIC_SEARCH_PATHS testSebastian Holtermann2017-03-027-0/+100
|
* Autogen: Fix for Q_PLUGIN_METADATA change detection testSebastian Holtermann2017-02-264-45/+46
|
* Autogen: Add AUTOMOC_DEPEND_FILTERS testSebastian Holtermann2017-02-2210-6/+46
|
* Autogen: Don't use .moc include in Q_PLUGIN_METADATA testSebastian Holtermann2017-02-212-12/+8
|
* Autogen: Tests: Set different compression levels in rcc testSebastian Holtermann2017-02-211-0/+11
|
* Autogen: Tests: Add Q_PLUGIN_METADATA testSebastian Holtermann2017-02-2117-2/+203
|
* Autogen: Tests: Add moc include testsSebastian Holtermann2017-02-2119-0/+354
|
* Autogen: Tests: Clean commentsSebastian Holtermann2017-02-211-11/+11
|
* AUTOGEN: Tests: AUTORCC SKIP_AUTORCC and SKIP_AUTOGEN testSebastian Holtermann2017-01-105-0/+46
|
* AUTOGEN: Tests: AUTOUIC SKIP_AUTOUIC and SKIP_AUTOGEN testSebastian Holtermann2017-01-1012-0/+147
|
* AUTOGEN: Tests: AUTOMOC SKIP_AUTOMOC and SKIP_AUTOGEN testSebastian Holtermann2017-01-108-0/+90
|
* QtAutogen: Tests: Increase minimum required CMake versionSebastian Holtermann2016-12-074-4/+4
|
* QtAutogen: Tests: Don't use std::auto_ptrSebastian Holtermann2016-12-072-2/+7
|
* QtAutogen: Tests: Don't include CMAKE_CURRENT_BINARY_DIRSebastian Holtermann2016-12-075-7/+3
|
* QtAutogen tests: Pass Qt compiler features to library targetsSebastian Holtermann2016-11-292-1/+7
|
* QtAutogen tests: Move the complex test case to a subdirectorySebastian Holtermann2016-11-2956-83/+88
|
* QtAutogen tests: Extend test description in CMakeLists.txtSebastian Holtermann2016-11-291-6/+14
|
* QtAutogen tests: Move independent sameName test to top list of CMakeLists.txtSebastian Holtermann2016-11-291-3/+4
|
* QtAutogen tests: Rename uiconly target to camel case uicOnlySebastian Holtermann2016-11-294-4/+6
| | | | Also move uicOnly sources to dedicated uicOnlySource directory.
* QtAutogen tests: Rename rcc_empty target to camel case rccEmptySebastian Holtermann2016-11-293-7/+6
|
* QtAutogen tests: Rename rcconly target to camel case rccOnly.Sebastian Holtermann2016-11-293-6/+11
| | | | Also add dedicated rccOnlyRes.qrc file for the rccOnly target.
* QtAutogen: Add test for empty qrc fileSebastian Holtermann2016-09-303-0/+19
|
* Simplify CMake per-source license noticesBrad King2016-09-2714-182/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* Tests/QtAutogen: Test same moc/qrc source names in different directoriesSebastian Holtermann2016-08-1021-0/+237
|
* Autogen: Revert changes to generate moc/rcc in subdirectoriesBrad King2016-07-2119-218/+0
| | | | | | | | | | | | | | | | | | | Revert these commits: * v3.6.0-rc1~134^2 Tests: QtAutogen: Same source name in different directories test, 2016-04-13 * v3.6.0-rc1~134^2~1 Autogen: Generate qrc_NAME.cpp files in subdirectories, 2016-04-19 * v3.6.0-rc1~134^2~2 Autogen: Generate not included moc files in subdirectories, 2016-04-19 They regress existing builds that depend on the paths/symbols generated previously. Another approach will be needed to solve the name collision problem they were intended to solve. Leave the error diagnostics for the colliding cases that were added in the same topic as the above commits because they provide a useful early failure in relevant cases. Fixes #16209.
* Revise C++ coding style using clang-formatKitware Robot2016-05-1653-859/+830
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * 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.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-298-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* Tests: QtAutogen: Same source name in different directories testSebastian Holtermann2016-04-2219-0/+234
| | | | | | | The test features multiple .cpp and .qrc files with the same name in different subdirectories. This requires AUTOMOC and AUTORCC to generate files with names that respect the path information of the source files.
* Revert "Automoc: Fix support of files with the same name (#12873)"Brad King2016-02-195-27/+1
| | | | | | | | | | This reverts commit 9beb2744d7685fca9cd5717308d4457dffdefcdc. Our AUTOMOC documentation states that it should be possible to `#include "moc_foo.cpp"` in `foo.cpp`, and this will not work if the file is placed in a different directory. Another solution will need to be found to the original problem. Reported-by: Stephen Kelly <steveire@gmail.com>
* Automoc: Fix support of files with the same name (#12873)Mariusz Pluciński2016-02-165-1/+27
|
* cmGlobalGenerator: Initialize generator targets on construction (#15729)Stephen Kelly2015-09-292-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Ninja generator and Visual Studio generators are special-cased for the QtAutogen feature. In order to reduce the number of custom targets, the Visual Studio generators prefer to create custom commands instead, and in order to create appropriate Ninja files, generated rcc files are listed as byproducts. This requires the use of the GetConfigCommonSourceFiles API of the cmGeneratorTarget for those generators when initializing the autogen target. The initializer method is called from Compute() after the cmGeneratorTarget objects are created, however the initialization of the object directory occurs later in the InitGeneratorTargets method. That means that the resulting object locations are computed incorrectly and cached before the object directory is determined, so the generated buildsystem can not find the object files. The initialization of the object directory was split from the creation of cmGeneratorTarget instances in commit 0e0258c8 (cmGlobalGenerator: Split creation of generator object from initialization., 2015-07-25). The motivation for the split was to do only what is essential to do early in cases where cmGeneratorTargets need to be created at configure-time. That is required for the purpose of implementing policies CMP0024 and CMP0026, and for try_compile(LINK_LIBRARIES). However, the split was not really necessary. Compute the object directory in the cmGeneratorTarget constructor instead. The QtAutogen unit test already tests the use of TARGET_OBJECTS with AUTOMOC, and that test already passes on Ninja. The reason it already passes is that the QtAutogen target also uses the AUTORCC feature, and specifies several qrc files in its SOURCES. Later in the Compute algorithm (after the InitGeneratorTargets call), the rcc files are determined and target->AddSource is called. The AddSource call clears the previously mentioned cache of source files, causing it to be regenerated when next queried, this time taking account of the object directory. Extend the test suite with a new target which does not make use of AUTORCC with qrc files so that the test added alone would break without the fix in this commit.
* Merge topic 'qt-autogen-always-run'Brad King2015-06-237-0/+76
|\ | | | | | | | | | | 2bf22a4b QtAutogen: Add comment explaining why rcc cannot use PRE_BUILD 0e346427 QtAutogen: Always run autogen step even when rcc is enabled (#15608)
| * QtAutogen: Always run autogen step even when rcc is enabled (#15608)Brad King2015-06-197-0/+76
| | | | | | | | | | | | | | | | In commit v3.2.0-rc1~480^2 (QtAutogen: Regenerate qrc files if their input changes, 2014-09-17) the "cmake -E cmake_autogen" rule was switched from always running to running as a custom command with dependencies if rcc is enabled. This is not correct because automoc always needs to re-run. Switch back to always running the command.
* | Tests: Don't hang when running Qt5Autogen built with GCC 5 (#15570).Stephen Kelly2015-06-211-2/+2
|/ | | | | | Since Qt 5.4.2, it is necessary to compile against Qt 5 with -fPIC and not -fPIE when using GCC 5. Not doing so results in a hanging test in this case, so use the PIC flag directly instead.
* QtAutogen: Process 'rcc --list' stdout and stderr separately (#15523)Brad King2015-04-213-0/+15
| | | | | | | | | | The stderr may have warning messages. We should not treat these lines as resource files. However, we must still recognize error message lines for missing resource files that may be generated. Extend the QtAutogen test to cover a generated resource as the only one listed in a .qrc file. This causes 'rcc --list' to print a warning to stderr that we now intend to ignore.
* QtAutogen: Workaround rcc CRCRLF newlines on Windows (#15459)Brad King2015-04-164-3/+3
| | | | | | | | | The 'rcc --list' operation may print newlines of the form CRCRLF, so strip any trailing CR characters found on each line. Update the Tests/QtAutogen test to use a resource named in a subdirectory. This causes 'rcc --list' to display a blank line and tests that it is correctly filtered out.
* Tests/QtAutogen: Avoid touching files in the source treeBrad King2015-04-164-2/+5
|
* Tests/QtAutogen: Help Qt5Autogen test find Qt5 on WindowsBrad King2015-04-161-0/+8
| | | | Set CMAKE_PREFIX_PATH to tell find_package(Qt5) where to look.
* Tests/QtAutogen: Enable per-config source tests when possibleBrad King2015-04-161-3/+2
| | | | | | | | | | | | | | Pass CMAKE_BUILD_TYPE into the test on generators that use it so that the per-config part of the test can activate as needed. Do not make the per-config part conditional on the Debug configuration because the generator expressions evaluate to empty in other configurations. Skip the per-config source case with the Ninja generator because it does not currently work. cmQtAutoGenerators::InitializeAutogenTarget needs to know the list of source files on a target, but generator expressions in the list cannot be evaluated until after CreateGeneratorTargets has been called. That cannot happen until after Autogen targets have been generated. It is a chicken-and-egg problem.
* Tests/QtAutogen: Require CMake 3.1 to set policies everywhereBrad King2015-04-162-2/+2
| | | | | We want CMP0020 set in the autorcc_depends test. Also the test should now only run when we can support per-config source files.
* Merge topic 'fix-autouic-regression'Brad King2015-01-122-0/+9
|\ | | | | | | | | | | 9a673737 QtAutoUic: Add a test for the regression in the parent commit. 7c585699 QtAutoUic: Restore source file AUTOUIC_OPTIONS settings