summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'string-JSON-error-modes'Brad King2022-03-311-1/+1
|\ | | | | | | | | | | | | | | 93dce4b4bf string(JSON): fix error message on invalid mode Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7130
| * string(JSON): fix error message on invalid modeCarlo Teubner2022-03-301-1/+1
| | | | | | | | | | | | | | The `GET_ARRAY` and `MEMBERS` modes were removed during development and review of commit 8eab76eb84 (string(JSON): Adds JSON parsing support to the string command, 2020-08-24, v3.19.0-rc1~159^2), but were accidentally left in an error message.
* | Merge topic 'GNUInstallDirs-revert-multiarch-prefixes'Brad King2022-03-312-4/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | 624ec3692f GNUInstallDirs: Revert "Apply Debian multiarch LIBDIR to more prefixes" Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7127
| * | GNUInstallDirs: Revert "Apply Debian multiarch LIBDIR to more prefixes"Brad King2022-03-302-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit dd9584b352 (GNUInstallDirs: Apply Debian multiarch LIBDIR to more prefixes, 2021-11-19, v3.23.0-rc1~323^2). There are separate problems with activating multiarch `LIBDIR` for each prefix it added: * Prefix `/` is often used to stage an installation with `DESTDIR` for inclusion in a tarball package or similar. * Prefix `/usr/local` is the default `CMAKE_INSTALL_PREFIX`, causing the multiarch `LIBDIR` to be cached after the first configuration, even if the prefix changes later. Revert the change for now, except for the documentation update. Further discussion will be needed to select a way to enable multiarch `LIBDIR` for `/` and `/usr/local`. Fixes: #23365 Issue: #19698
* | | Merge topic 'ninja_compile_database_understand_new_cuda_lang_variables'Brad King2022-03-311-0/+2
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | f7c6b9833c CUDA: Ninja generator generates valid compile database Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7129
| * | CUDA: Ninja generator generates valid compile databaseRobert Maynard2022-03-301-0/+2
| |/ | | | | | | | | | | | | The ninja generator has been updated to poperly write the compile database when the CUDA language has been enabled. Fixes #23368
* | Merge topic 'verify-header-sets'Brad King2022-03-3037-0/+221
|\ \ | | | | | | | | | | | | | | | | | | | | | c798744f81 FILE_SET: Add VERIFY_HEADER_SETS target property Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7085
| * | FILE_SET: Add VERIFY_HEADER_SETS target propertyKyle Edwards2022-03-2937-0/+221
| | | | | | | | | | | | Fixes: #23338
* | | Merge topic 'preserve-compiler-arg1'Brad King2022-03-305-11/+20
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 211a9deac1 Preserve CMAKE_${lang}_COMPILER_ARG1 from existing CMakeCache.txt b4de4217ae Tests: Simplify RunCMake.CompilerArgs no-clean cases Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7122
| * | | Preserve CMAKE_${lang}_COMPILER_ARG1 from existing CMakeCache.txtKlein, Thorsten (BSH)2022-03-295-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `CMAKE_<LANG>_COMPILER` may be a list if it was defined by a toolchain file. In this case we move the args to `CMAKE_<LANG>_COMPILER_ARG1`. If `CMAKE_<LANG>_COMPILER` is not a list, then it might have been cached by a previous run that split the `CC` or `CXX` environment variable into `CMAKE_<LANG>_COMPILER` and `CMAKE_<LANG>_COMPILER_ARG1`. In this latter case, avoid clobbering `CMAKE_<LANG>_COMPILER_ARG1`. Fixes: #23358
| * | | Tests: Simplify RunCMake.CompilerArgs no-clean casesBrad King2022-03-291-12/+7
| | | | | | | | | | | | | | | | Also distinguish between the toolchain and env cases in the output.
* | | | Merge topic 'framework-consumption-during-compilation'Brad King2022-03-305-0/+43
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 45ac71d8bc Ensure targets which are frameworks can be used freely Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: alcroito <alexandru.croitor@qt.io> Merge-request: !7121
| * | | | Ensure targets which are frameworks can be used freelyMarc Chevrier2022-03-295-0/+43
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Ensure flag -F/path/to/framework is specified during compilation step of consumers of the framework. Fixes: #23336
* | | | Merge topic 'set-env-var-first-run'Brad King2022-03-2910-4/+42
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 05e510bf0b CMP0132: Don't set compiler environment variables on first run 774a9eb210 Tests: Reorder CMP0129 test Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7108
| * | | | CMP0132: Don't set compiler environment variables on first runCraig Scott2022-03-2910-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running CMake for the first time in a build tree, for some generators CMake would set compiler environment variables like CC, CXX, etc. when the corresponding language is enabled. That behavior was never documented and can result in different behavior between the first and subsequent runs. Add a policy to no longer set those environment variables. Fixes: #21378
| * | | | Tests: Reorder CMP0129 testCraig Scott2022-03-261-4/+6
| | | | | | | | | | | | | | | Move the CMP0129 tests up to be with the other policy tests.
* | | | | Merge topic 'fix-23191'Brad King2022-03-293-1/+15
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fd46db1745 Trace: process else and elseif commands correctly Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Merge-request: !7118
| * | | | Trace: process else and elseif commands correctlyBraulio Valdivielso Martinez2022-03-253-1/+15
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There have been two bugs reported about the `else` and `elseif` commands in the context of the tracing functionality and the json-v1 format (#23191 #22315). In essence, the reported traces referred to the layer of the stacktrace immediately on top of the expected ones. This MR fixes both issues. My solution adds a new parameter to the `PrintCommandTrace` function, `commandMissingFromStack`, that callers can specify if the command they want to report a trace for is not a regular part of the stack maintained in `cmMakefile`. This is only the case for `else` and `elseif`. The other bug is fixed by having the caller pass a `cmListFileBacktrace`, which helps in getting the right lines, file names... for the reported command. Fixes: #23191 #22315
* | | | Merge topic 'variable-link-feature-supported'Brad King2022-03-2813-1/+51
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | 1777883f8b genex-LINK_(LIBRARY|GROUP) features: update variables behavior Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7113
| * | | genex-LINK_(LIBRARY|GROUP) features: update variables behaviorMarc Chevrier2022-03-2513-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Variable CMAKE_LINK_(LIBRARY|GROUP)_USING_<FEATURE>_SUPPORTED is evaluated only if CMAKE_<LANG>_LINK_(LIBRARY|GROUP)_USING_<FEATURE>_SUPPORTED is not defined. This new behavior enable to activate a feature globally on a platform and to disable it for some compilers and languages.
* | | | Tests: Add Matlab label to Matlab-related testsSilvio2022-03-252-0/+7
| |/ / |/| |
* | | 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