summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Reorder CMP0129 testCraig Scott2022-03-261-4/+6
| | | Move the CMP0129 tests up to be with the other policy tests.
* Merge topic 'link-interface-direct'Brad King2022-03-257-6/+68
|\ | | | | | | | | | | | | | | | | | | cf312a2e54 LINK_LIBRARIES: Add support for LINK_ONLY genex 41a6b4a53b INTERFACE_LINK_LIBRARIES_DIRECT: Honor link dependencies through LINK_ONLY 73337cb383 LINK_LIBRARIES: Evaluate separately for linking and usage requirements Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7107
| * LINK_LIBRARIES: Add support for LINK_ONLY genexBrad King2022-03-244-0/+34
| | | | | | | | | | | | | | Previously we always used content guarded by `$<LINK_ONLY:...>` in `LINK_LIBRARIES`, even when evaluating for non-linking usage requirements. Add a policy to honor `LINK_ONLY` in `LINK_LIBRARIES` the same way we already do in `INTERFACE_LINK_LIBRARIES`.
| * INTERFACE_LINK_LIBRARIES_DIRECT: Honor link dependencies through LINK_ONLYBrad King2022-03-223-6/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit f3ad061858 (Add usage requirements to update direct link dependencies, 2022-01-12, v3.23.0-rc1~44^2), we evaluated the transitive closure of `INTERFACE_LINK_LIBRARIES` as a non-linking usage requirement. That left out `INTERFACE_LINK_LIBRARIES_DIRECT` link dependencies that appear behind private dependencies of a static library, guarded by the `$<LINK_ONLY:...>` generator expression. At the time, that decision was intentional, in order to prevent arbitrary usage requirements from leaking out of `PRIVATE` dependencies. Since then, we've revised evaluation of `LINK_LIBRARIES` to distinguish between collecting link dependencies and other usage requirements. Use that information when following `INTERFACE_LINK_LIBRARIES` to collect the matching kind of requirements from `INTERFACE_LINK_LIBRARIES_DIRECT`. Fixes: #22496
* | Merge topic 'cmake-fresh'Brad King2022-03-258-3/+47
|\ \ | | | | | | | | | | | | | | | | | | | | | 9f1471739d cmake: Add --fresh option to clear the cache and start from scratch Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !7099
| * | cmake: Add --fresh option to clear the cache and start from scratchBrad King2022-03-228-3/+47
| |/ | | | | | | | | | | | | Simplify the workflow to re-run CMake from scratch as if a build tree were never before processed, regardless of whether it has been. Fixes: #23119
* | cmake -E tar: Add --touch optionKasper Laudrup2022-03-232-0/+16
| | | | | | | | | | | | | | | | Similar to GNU tar add a --touch option to the tar extract command to skip extracting the timestamps from the files in the archive effectively touching them as if they were just created. Issue: #22746
* | Tests: Add test for 'cmake -E tar --mtime' optionKasper Laudrup2022-03-233-0/+23
| | | | | | | | Add a test for ensuring the `--mtime` option works as expected.
* | Merge topic 'initialize-property-name'Brad King2022-03-2311-23/+23
|\ \ | | | | | | | | | | | | | | | | | | 26caa97057 define_property(): Change constraints of INITIALIZE_FROM_VARIABLE Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7103
| * | define_property(): Change constraints of INITIALIZE_FROM_VARIABLEKyle Edwards2022-03-2311-23/+23
| | | | | | | | | | | | | | | | | | | | | Remove the requirement that the variable name have a prefix while keeping the suffix requirement. Require that the property name contains an underscore. Update docs and tests accordingly. Fixes: #23340
| * | Revert INTERFACE_LINK_LIBRARIES_DIRECT feature for 3.23 branchBrad King2022-03-2163-773/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit f3ad061858 (Add usage requirements to update direct link dependencies, 2022-01-12, v3.23.0-rc1~44^2) and the property storage updates in its predecessor commit 193a999cd5 (cmTarget: Add INTERFACE_LINK_LIBRARIES_DIRECT{,_EXCLUDE} backtrace storage, 2022-01-06, v3.23.0-rc1~44^2~1) from the 3.23 release branch. After initial experience using the feature in practice, additional design considerations have been raised for discussion in the original issue. To avoid rushing this for the 3.23 series, we've decided to revert the feature for now so it can be revised for a future release. Issue: #22496
| * | Merge topic 'always_prefer_last_source_dir' into release-3.23Brad King2022-03-181-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | b44ad7992a cmake: Always prefer the last source directory provided Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7084
* | | | Genex-LINK_GROUP: Add support feature RESCAN on BSD systemsMarc Chevrier2022-03-221-1/+1
| |_|/ |/| |
* | | Merge topic 'ghs_predefined_targets'Brad King2022-03-216-123/+105
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 399e73b89a GHS: release note 829e946c69 GHS: Update tests for updated binary layout 93c1acd8ff GHS: List predefined targets before user targets in GUI bdb213819c GHS: Do not include WindowsPaths b3e9c72901 GHS: use INSTALL target a645287784 GHS: update build command 724b5491ef GHS: Rearrange project files in binary directory edff0f6a1d GHS: Use Custom Target for ALL_BUILD ... Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7079
| * | | GHS: Update tests for updated binary layoutFred Baksik2022-03-175-122/+104
| | | | | | | | | | | | | | | | The tests need to look for the items in the correct locations.
| * | | GHS: use INSTALL targetFred Baksik2022-03-171-1/+1
| | | | | | | | | | | | | | | | For consistancy use upper case install for pre-defined targets.
* | | | Merge topic 'LINK_LIBRARY-WHOLE_ARCHIVE'Brad King2022-03-214-36/+57
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dabe56de58 genex-LINK_LIBRARY: Add feature WHOLE_ARCHIVE Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: huangqinjin <huangqinjin@gmail.com> Merge-request: !7064
| * | | | genex-LINK_LIBRARY: Add feature WHOLE_ARCHIVEMarc Chevrier2022-03-174-36/+57
| | | | |
* | | | | Merge topic 'cmake-P-args'Brad King2022-03-183-4/+17
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 36056ff5a3 cmake: Improve acceptance of arbitrary arguments in -P script mode Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7083
| * | | | | cmake: Improve acceptance of arbitrary arguments in -P script modeBrad King2022-03-173-4/+17
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix in commit e4f1b301fe (cmake: Allow arbitrary args passed to CMake script, 2020-05-04, v3.18.0-rc1~211^2) only applied to "cache" arguments like `-DFOO`. Extend the fix to allow arbitrary arguments that collide with other CMake arguments like `-S` and `-B`.
* | | | | Merge topic 'always_prefer_last_source_dir'Brad King2022-03-181-1/+1
|\ \ \ \ \ | |/ / / / |/| | | / | | |_|/ | |/| | | | | | | | | | | | | | b44ad7992a cmake: Always prefer the last source directory provided Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7084
| * | | cmake: Always prefer the last source directory providedRobert Maynard2022-03-171-1/+1
| | | | | | | | | | | | | | | | Fixes: #23334
* | | | Merge topic 'tll-genex-concat'Brad King2022-03-173-0/+28
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | add64399c5 target_link_libraries: Restore LINK_ONLY for multiple static lib dependencies Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7078
| * | | target_link_libraries: Restore LINK_ONLY for multiple static lib dependenciesBrad King2022-03-163-0/+28
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit c1e812ad4f (target_link_libraries: Improve tolerance of unquoted generator expressions, 2022-02-15, v3.23.0-rc2~11^2) we accumulate consecutive non-keyword arguments to recover an unquoted generator expression as a single entry. When given multiple consecutive non-genex library names, the grouping breaks our logic that expects each entry is either a raw target name or a genex. Revise the logic to only accumulate multiple arguments when they end inside a partial genex. This bug caused `target_link_libraries` to stop wrapping static library private dependencies in `$<LINK_ONLY:...>` for `INTERFACE_LINK_LIBRARIES` when multiple consecutive library names are given. Add a test case covering that behavior. Fixes: #23302
* | | Tests: Fix FindMatlab.r2018a_check case in MATLAB R2021a and R2021bSilvio Traversaro2022-03-151-6/+1
| | | | | | | | | | | | Fix a version-as-float comparison bug in the test.
* | | Merge topic 'test-RunCMake-lld-llvm-warnings'Brad King2022-03-151-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | af5e4e44ca Tests: Teach RunCMake to ignore lld-link PDB item index warnings Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7065
| * | | Tests: Teach RunCMake to ignore lld-link PDB item index warningsBrad King2022-03-111-0/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit fade5b5b8c (gitlab-ci: Update Windows builds to MSVC 19.31 toolset, 2022-03-09, v3.23.0-rc3~4^2~1) we switched from MSVC toolset version 14.30.30705 to version 14.31.31103. The latter causes the Clang 13.0.0 lld-link tool to warn about invalid PDB item indexes, as discussed [here](https://developercommunity.visualstudio.com/t/1667797). This causes the RunCMake.PrecompileHeaders test PchLibObjLibExe case to fail on NMake builds due to unexpected content on stderr. The warnings appear with Ninja too, but `ninja` prints them on stdout. Teach the RunCMake infrastructure to ignore these warnings.
* | | Merge topic 'find_package-global-imported'Brad King2022-03-1114-0/+139
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2f1ffa003c find_package: Add support for default GLOBAL imported targets Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6862
| * | | find_package: Add support for default GLOBAL imported targetsJohn Parent2022-03-1014-0/+139
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Allow find package to promote scope of imported targets by specifying an argument to `find_package` or by specifying a CMake variable. * Add support for CMAKE_GLOBAL_IMPORT_SCOPE variable * Add support for GLOBAL argument to find_package Additionally add testing for above features.
* | | Merge topic 'cuda-arch-native'Brad King2022-03-1110-5/+31
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d1b48bfabd CUDA: Add support for CUDA_ARCHITECTURES=native 632752d62e CUDA: Add FIXME comments about deferring architecture testing 45e9ab0372 Tests: Rename CudaOnly.{All => ArchSpecial} Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7050
| * | | CUDA: Add support for CUDA_ARCHITECTURES=nativeBrad King2022-03-108-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CUDA 11.6 added the `nvcc -arch=native` flag to automatically compile for the host GPUs' architectures. Add support for specifying this special `native` value in `CMAKE_CUDA_ARCHITECTURES` and `CUDA_ARCHITECTURES`. During the compiler ABI detection step, detect the native architectures so we can pass them explicitly when using Clang or older versions of nvcc. Fixes: #22375
| * | | Tests: Rename CudaOnly.{All => ArchSpecial}Brad King2022-03-103-4/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | The purpose of the test is to cover special values of `CMAKE_CUDA_ARCHITECTURES`. Prepare to add more than just `all` and `all-major`. While at it, fix the `project()` name in the test to match what we pass to `ctest` with `--build-project`.
* | | Merge topic 'FindX11-xcb-components'Brad King2022-03-112-0/+30
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | ce28748ced FindX11: add xcb-xtest and xcb-keysyms Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7052
| * | | FindX11: add xcb-xtest and xcb-keysymsplanc2022-03-102-0/+30
| | | |
* | | | Merge topic 'test-fix-regex'Brad King2022-03-111-1/+1
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | 5059db7c17 Tests: Fix CMake syntax warning in RunCMake.CTestCommandLine Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Frank Winklmeier <frank.winklmeier@cern.ch> Merge-request: !7062
| * | | Tests: Fix CMake syntax warning in RunCMake.CTestCommandLineBrad King2022-03-101-1/+1
| |/ / | | | | | | | | | | | | Fix a regex added in the test by commit 140704d443 (ctest: add option for output truncation, 2022-03-07).
* | | Merge topic 'cuda-arch-off'Brad King2022-03-103-0/+24
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | 7024596a26 Tests: Fix testing CMAKE_CUDA_ARCHITECTURES=OFF with Clang 2a79b647fa CUDA: Restore support for CMAKE_CUDA_ARCHITECTURES=OFF Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7058
| * | Tests: Fix testing CMAKE_CUDA_ARCHITECTURES=OFF with ClangBrad King2022-03-102-0/+18
| | | | | | | | | | | | | | | | | | Clang does not automatically choose an architecture supported by the SDK. The `OFF` value is meant for users to provide their own architecture flags, so provide one as part of the test.
| * | CUDA: Restore support for CMAKE_CUDA_ARCHITECTURES=OFFRobert Maynard2022-03-093-0/+6
| | | | | | | | | | | | Fixes: #23309
* | | Merge topic 'ctest-WORKING_DIRECTORY'Brad King2022-03-101-1/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | a116fd413d ctest: print WORKING_DIRECTORY property with -V Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7060
| * | ctest: print WORKING_DIRECTORY property with -VKevin Puetz2022-03-091-1/+1
| | |
* | | Merge topic 'ctest_truncate'Brad King2022-03-098-4/+68
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 140704d443 ctest: add option for output truncation 359e5b17d8 presets: bump version to v5 4634de335b cmCTestTestHandler: refactor CleanTestOutput method Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6993
| * | | ctest: add option for output truncationFrank Winklmeier2022-03-086-1/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add `--test-output-truncation` to `ctest`. This option can be used to customize which part of the test output is being truncated. Currently supported values are `tail`, `middle` and `head`. Also add equivalent `CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION` variable. Fixes: #23206
| * | | presets: bump version to v5Frank Winklmeier2022-03-083-3/+3
| | | | | | | | | | | | | | | | Prepare for new test preset fields.
* | | | Merge topic 'color-diagnostics'Brad King2022-03-0912-0/+96
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6ab9fbd43b color: Add tests for CMAKE_COLOR_DIAGNOSTICS 78adb1b952 color: Add CMAKE_COLOR_DIAGNOSTICS environment variable 884d9de8b7 color: Introduce CMAKE_COLOR_DIAGNOSTICS variable Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Frank Dana <ferdnyc@gmail.com> Merge-request: !6990
| * | | | color: Add tests for CMAKE_COLOR_DIAGNOSTICSBrad King2022-03-0812-0/+96
| |/ / /
* | | | Merge topic 'FindX11--xcb-randr'Brad King2022-03-092-0/+19
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 364798fa6b FindX11: Add xcb_randr library Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7046
| * | | | FindX11: Add xcb_randr libraryMatthew Smith2022-03-082-0/+19
| | | | |
* | | | | Merge topic 'ignore-prefix-path-test-program-path'Brad King2022-03-091-0/+1
|\ \ \ \ \ | |_|_|/ / |/| | | / | | |_|/ | |/| | | | | | | | | | | | | | 11ea24e590 Tests: Disable CMAKE_SYSTEM_PROGRAM_PATH in IgnorePrefixPath test Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7055
| * | | Tests: Disable CMAKE_SYSTEM_PROGRAM_PATH in IgnorePrefixPath testKyle Edwards2022-03-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some systems set CMAKE_SYSTEM_PROGRAM_PATH, which pollutes the environment for this test. Erase it before executing the test to get a clean environment. Fixes: #23300