summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'foreach-int-parse-range-check' into release-3.18Brad King2020-09-214-0/+9
|\ | | | | | | | | | | | | 0412b55b83 foreach: Fix crash parsing integer out of range Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5239
| * foreach: Fix crash parsing integer out of rangeBen McMorran2020-09-184-0/+9
| |
* | Ninja Multi-Config: Fix dependencies of custom commandsKyle Edwards2020-09-175-7/+27
|/ | | | | | | | | | a9fd3a10 addressed the scenario where the depending target is a utility target, but not the scenario where the dependent target is a utility target. Account for this scenario. Also add a Qt-specific test case. Fixes: #21118
* 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
* Ninja Multi-Config: Fix dependencies of utility targetsKyle Edwards2020-09-025-1/+30
| | | | Fixes: #21118
* Tests: Pass additional Qt information to Ninja and NMC testsKyle Edwards2020-09-013-3/+4
|
* Merge topic 'automoc-depend-project-file' into release-3.18Brad King2020-09-017-0/+146
|\ | | | | | | | | | | | | | | 776059ef0f Merge branch 'backport-3.17-automoc-depend-project-file' 6b20bbd2dd AutoMoc: Restore support for re-running after project file changes Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5166
| * 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
* | | UseSWIG: Update option -interface usageMarc Chevrier2020-08-318-0/+62
|/ / | | | | | | | | | | | | Option -interface must not be used if multiple SWIG files are part of the same library. Fixes: #21134
* | Tests: Fix RunCMake.try_compile test for C standards with MSVC 19.27Brad King2020-08-191-0/+9
| | | | | | | | | | | | | | Since commit f7347f28c7 (MSVC: Record support for C11 and c_restrict, 2020-08-09) we know about MSVC C language standards. Update the `RunCMake.try_compile` test to be aware of this even when CMake is itself configured by an older CMake that does not know this.
* | Merge topic 'FindPython-manage-SOABI-in-all-versions' into release-3.18Brad King2020-08-121-0/+16
|\ \ | | | | | | | | | | | | | | | | | | 951640f1f9 FindPython: manage SOABI for all Python versions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5119
| * | FindPython: manage SOABI for all Python versionsMarc Chevrier2020-08-111-0/+16
| | | | | | | | | | | | Fixes: #21070
* | | Merge topic 'automoc-path-prefix-off' into release-3.18Brad King2020-08-111-0/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5b5be34811 Help: Add 3.18.2 release note about AUTOMOC_PATH_PREFIX default change db659e18bc Merge branch 'backport-3.17-automoc-path-prefix-off' e503fbe38a Merge branch 'backport-3.16-automoc-path-prefix-off' 4c33b305a0 Autogen: Turn off moc path prefix generation by default 56510b7d85 Merge branch 'backport-test-FindPkgConfig-isolate-env' into release-3.17 effc9a1032 Merge branch 'backport-3.17-automoc_timestamp_deps' into release-3.17 507fecd7e2 Merge branch 'ninja-multi-rsp-remove-path' into release-3.17 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5105
| * | 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
| | * | Merge branch 'backport-test-FindPkgConfig-isolate-env' into release-3.17Brad King2020-08-071-0/+5
| | |\ \ | | | | | | | | | | | | | | | Merge-request: !5108
| | | * | Tests: Isolate RunCMake.FindPkgConfig from caller environmentBrad King2020-08-071-0/+5
| | | |/ | | | | | | | | | | | | | | | | Avoid interference from `CMAKE_PREFIX_PATH` and friends if they happen to be set in the environment from which the tests are run.
| | | * Merge branch 'backport-3.16-pch-fix-bad-ClearSourcesCache' into release-3.16Brad King2020-05-291-2/+5
| | | |\ | | | | | | | | | | | | | | | Merge-request: !4815
| | | * \ Merge branch 'vs-pch-compile-opts' into release-3.16Brad King2020-05-111-0/+3
| | | |\ \ | | | | | | | | | | | | | | | | | | Merge-request: !4734
| | | * \ \ Merge branch 'backport-3.16-FindPkgConfig-isystem' into release-3.16Brad King2020-05-061-1/+21
| | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | Merge-request: !4693
| | | * \ \ \ Merge branch 'CheckLanguage-cuda-host' into release-3.16Brad King2020-05-051-9/+9
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: !4711
* | | | \ \ \ \ Merge topic 'FindPython-user-policies' into release-3.18Brad King2020-08-101-1/+1
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a92d384548 FindPython: ensure user's policies are respected Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Henry Schreiner <henryschreineriii@gmail.com> Merge-request: !5098
| * | | | | | | FindPython: ensure user's policies are respectedMarc Chevrier2020-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not set the policy version before recording our internal macros such as `__Python_add_library`. Otherwise callers get our policy version instead of theirs. Instead just set the specific policies we need. Also fix one case in our test suite where we were accidentally relying on the policy version to be set by `FindPython`. Fixes: #21042
* | | | | | | | Merge topic 'test-FindPkgConfig-isolate-env' into release-3.18Brad King2020-08-101-0/+5
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8b12982653 Merge branch 'backport-test-FindPkgConfig-isolate-env' 4c939b0d39 Tests: Isolate RunCMake.FindPkgConfig from caller environment 20eeb40aaf Tests: Isolate RunCMake.FindPkgConfig from caller environment Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5108
| * | | | | | | | Tests: Isolate RunCMake.FindPkgConfig from caller environmentBrad King2020-08-071-0/+5
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid interference from `CMAKE_PREFIX_PATH` and friends if they happen to be set in the environment from which the tests are run.
* | | | | | | | Merge branch 'backport-3.17-automoc_timestamp_deps'Brad King2020-08-056-0/+56
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| / / / / / / | |/ / / / / /
| * | | | | | AutoGen: Add test to check for correct AutoMoc dependenciesAlexandru Croitor2020-08-036-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using Qt 5.15.0 or above together with Ninja, check that touching a source file of a dependency does not needlessly re-run AUTOMOC for the dependee target.
| * | | | | | Merge branch 'backport-3.17-graphviz-restore-per-target' into release-3.17Brad King2020-07-213-0/+56
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: !5039
| * \ \ \ \ \ \ Merge topic 'pch-fix-bad-ClearSourcesCache' into release-3.17Brad King2020-06-011-2/+5
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 902858367f Merge branch 'backport-3.16-pch-fix-bad-ClearSourcesCache' fa7b041eca PCH: Fix logic error that incorrectly clears sources during VS generation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4815
* | | | | | | | | Unity Builds: Do not set SKIP_AUTOGEN to source filesCristian Adam2020-07-294-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #21028
* | | | | | | | | Merge topic 'revert-add_test-special-chars' into release-3.18Brad King2020-07-2856-373/+6
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5fc5f4d26e add_test: Revert "Allow special characters in test name" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5067
| * | | | | | | | | add_test: Revert "Allow special characters in test name"Brad King2020-07-2756-373/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit f84af8e270 (add_test: Allow special characters in test name, 2020-05-16, v3.18.0-rc1~142^2). Unfortunately the fix breaks projects that were working around the limitation with manual escaping. The fix can be re-introduced with a policy in a future version. Also add a 3.18.1 release note explaining the change. Fixes: #21017, #20965 Issue: #19391
* | | | | | | | | | Merge topic 'vs-lang-flags' into release-3.18Brad King2020-07-273-0/+23
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c4109a1bc8 VS: Restore toleration of target-wide -TP flag with MSVC Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5051
| * | | | | | | | | VS: Restore toleration of target-wide -TP flag with MSVCBrad King2020-07-233-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 3b547e2e4b (VS: Simplify logic adding source file C/C++ language flag to MSVC, 2020-05-15, v3.18.0-rc1~139^2~1) we only add a per-source language selection flag when the source file extension does not match the compiler's default. This approach breaks when a project adds a target-wide `-TP` flag. Although such projects likely did not work with non-VS generators, we did support them before in Visual Studio generators. Add a special case to tolerate such flags again. Fixes: #21005
* | | | | | | | | | Merge topic 'graphviz-restore-per-target' into release-3.18Brad King2020-07-223-0/+56
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1829220310 Merge branch 'backport-3.17-graphviz-restore-per-target' f3a6b4a209 Tests: Cover Graphviz support for per-target dependency graph options 93549b9224 Graphviz: Restore support for per-target dependency graph options Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5039
| * \ \ \ \ \ \ \ \ \ Merge branch 'backport-3.17-graphviz-restore-per-target'Brad King2020-07-213-0/+56
| |\ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / | |/| | | / / / / / / | | | |_|/ / / / / / | | |/| | | | | | |
| | * | | | | | | | Tests: Cover Graphviz support for per-target dependency graph optionsStephan Rohmen2020-07-213-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: #20928
* | | | | | | | | | Swift: Fix regression in linking to interface librariesBrad King2020-07-171-0/+1
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 2026915f8f (Swift: Propagate Swift_MODULE_DIRECTORY as include directory, 2020-02-03, v3.18.0-rc1~547^2) we internally call `GetAllConfigCompileLanguages` on all directly linked targets without checking if they are interface libraries that don't compile at all. That violates an internal assumption and assertion. Fixes: #20977
* | | | | | | | | Merge topic 'source_file_props_dedup_scopes' into release-3.18Craig Scott2020-07-141-0/+19
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f6969b917d set_property: Deduplicate source file directory scopes Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5009
| * | | | | | | | | set_property: Deduplicate source file directory scopesAlexandru Croitor2020-07-131-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A user could specify the same directory scope to set_property() multiple times, which in conjunction with APPEND would append the property multiple times. Make sure to deduplicate scopes across both DIRECTORY and TARGET_DIRECTORY options, so that a property is only appended once in such a scenario. Fixes: #20941
* | | | | | | | | | Merge topic 'macos-11-file-GET_RUNTIME_DEPENDENCIES' into release-3.18Brad King2020-07-141-12/+14
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d9af90504f Tests: Update file(G_R_D) test to make system library optional c51400033c file: Update GET_RUNTIME_DEPENDENCIES for macOS 11 dylib cache Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Merge-request: !4998
| * | | | | | | | | | Tests: Update file(G_R_D) test to make system library optionalKyle Edwards2020-07-131-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the system library may not exist on the filesystem on macOS 11, skip it if it doesn't exist.
* | | | | | | | | | | Merge topic 'profiling-case-insensitive-command-names' into release-3.18Brad King2020-07-142-1/+18
|\ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7cf2f7d2af cmake: Store lowercase command names in profiling output Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5007
| * | | | | | | | | | cmake: Store lowercase command names in profiling outputCraig Scott2020-07-132-1/+18
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures commands can be properly aggregated by tools processing the profiling output. Fixes: #20946
* | | | | | | | | | ALIAS targets: Non-global aliases must be propagated to sub-directoriesMarc Chevrier2020-07-114-6/+25
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #20942
* | | | | | | | | set_property: Allow both DIRECTORY and TARGET_DIRECTORY togetherAlexandru Croitor2020-07-092-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow to specify both DIRECTORY and TARGET_DIRECTORY at the same time in `set_source_files_properties()` and `set_property(SOURCE)` commands. Add test cases and update the documentation. Fixes: #20932
* | | | | | | | | set_property: Fix name of TARGET_DIRECTORY option in error messagesAlexandru Croitor2020-07-092-4/+4
| | | | | | | | |
* | | | | | | | | Help: Clarify search order for resource spec fileKyle Edwards2020-07-076-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clarify the order in which --resource-spec-file, RESOURCE_SPEC_FILE, and CTEST_RESOURCE_SPEC_FILE are searched, and add tests to enforce this. Fixes: #20914