Commit Graph

56305 Commits

Author SHA1 Message Date
Robert Maynard 2a79b647fa CUDA: Restore support for CMAKE_CUDA_ARCHITECTURES=OFF
Fixes: #23309
2022-03-09 12:30:12 -05:00
Brad King 1aa51fb9e3 Merge branch 'release-3.22' into release-3.23 2022-03-09 12:12:01 -05:00
Brad King 04d42cb908 Merge topic 'ignore-prefix-path-test-program-path' into release-3.23
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
2022-03-09 12:11:06 -05:00
Brad King 0402d35168 Merge topic 'binutils-llvm-mt' into release-3.23
73d0d4e4b5 BinUtils: Avoid llvm-mt because it is missing 'mt' features we use

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7054
2022-03-09 12:10:14 -05:00
Brad King 5b29664e58 Merge topic 'iar-cmp0057' into release-3.23
bd3e23a605 IAR: Fix detection of modern C++ version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7053
2022-03-09 12:09:02 -05:00
Brad King 9acecc3eb9 Merge topic 'doc-file-sets' into release-3.23
4286b72240 Help: Update install() docs to better reflect preference for file sets
ab1b573f41 Help: Reorganise FILE_SETS and related properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7031
2022-03-09 12:07:57 -05:00
Kyle Edwards 11ea24e590 Tests: Disable CMAKE_SYSTEM_PROGRAM_PATH in IgnorePrefixPath test
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
2022-03-08 17:38:07 -05:00
Brad King 11c25ae6ae Merge topic 'cmake-presets-file-dir' into release-3.23
f54507c2f6 CMakePresets.json: Add ${fileDir} macro

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Gerhard Olsson <gerhard.nospam@gmail.com>
Merge-request: !7051
2022-03-08 16:03:14 -05:00
Brad King ba695c87e1 Merge topic 'test-cmp0125' into release-3.23
eca72dab8b Tests: Make RunCMake.CMP0125 robust to external filesystem content

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7049
2022-03-08 16:02:15 -05:00
Brad King 71268ca934 Merge branch 'release-3.21' into release-3.22 2022-03-08 11:55:31 -05:00
Brad King 3f737ba2ec Merge branch 'binutils-llvm-mt' into release-3.22
Merge-request: !7054
2022-03-08 11:55:16 -05:00
Brad King 33ed5b97fe Merge branch 'binutils-llvm-mt' into release-3.21
Merge-request: !7054
2022-03-08 11:54:58 -05:00
Brad King 73d0d4e4b5 BinUtils: Avoid llvm-mt because it is missing 'mt' features we use
Since commit cf82300a63 (BinUtils: Clarify search logic and make it more
consistent, 2021-05-27, v3.21.0-rc1~119^2~2) we correctly prefer the
more-specific name `llvm-mt` over `mt` when using Clang.  However, the
`llvm-mt` tool does not yet support all the flags we need in the
implementation of `vs_link_{exe,dll}`.  Prefer plain `mt` for now.

Fixes: #23305
2022-03-08 11:48:30 -05:00
Kenneth Soerensen bd3e23a605 IAR: Fix detection of modern C++ version
The change in commit cc4da8d13a (IAR/CXX: Fix compatibility with CMP0057
OLD, 2022-01-29, v3.23.0-rc1~46^2) broke the detection of C++ version
because the `IN_LIST` operator cannot work directly on a list but
requires a variable.
2022-03-08 09:34:48 -05:00
Brad King 130c988982 Merge topic 'doc-lang-std-features' into release-3.23
fbda79f39d Help: Document explicitly that 'cxx_std_##' features may not add a flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: antmak <antmak.pub@gmail.com>
Merge-request: !7043
2022-03-08 08:25:19 -05:00
Brad King 402b9cdbb7 Merge branch 'release-3.22' into release-3.23 2022-03-08 08:23:31 -05:00
Brad King 1d9b545390 Merge topic 'FindMatlab-minver' into release-3.23
bb2c7b7dc0 FindMatlab: Fix logic error when minimum version is not found

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7047
2022-03-08 08:22:09 -05:00
Craig Scott 4286b72240 Help: Update install() docs to better reflect preference for file sets
Previously, headers would typically be installed as bare files or
as whole directories. File sets offer a better abstraction and
associate headers with a target, installing them as part of the
target. Add notes and update examples to draw the reader's
attention to the advantages of file sets for headers.
2022-03-08 19:38:56 +11:00
Kyle Edwards f54507c2f6 CMakePresets.json: Add ${fileDir} macro
Fixes: #23214
2022-03-07 18:03:16 -05:00
Brad King eca72dab8b Tests: Make RunCMake.CMP0125 robust to external filesystem content
Revise the test from commit 08db1341a6 (find_*: ensure consistent
behavior for cache variables, 2021-05-03, v3.21.0-rc1~177^2) to avoid
searching outside the test directories.

Fixes: #23299
2022-03-07 11:40:30 -05:00
Brad King 5424bf5c8a Merge branch 'FindMatlab-minver' into release-3.22
Merge-request: !7047
2022-03-07 10:13:25 -05:00
Michael Hirsch bb2c7b7dc0 FindMatlab: Fix logic error when minimum version is not found
Fix logic added by commit 7fdd5128b1 (FindMatlab: Fix version selection
if a version is given, 2021-07-02, v3.22.0-rc1~66^2).  Ensure that
`_list_index` is always initialized to -1, akin to `list(FIND)` not
finding a match.

Issue: #22377
2022-03-07 10:12:43 -05:00
Brad King fbda79f39d Help: Document explicitly that 'cxx_std_##' features may not add a flag
This is commonly reported incorrectly as a bug, so call out this
behavior explicitly in the documentation.
2022-03-07 09:48:26 -05:00
Craig Scott ab1b573f41 Help: Reorganise FILE_SETS and related properties
Reduce duplication and make the docs for target_sources() focus
on the functionality rather than the properties it modifies.
The properties are a lower level quantity, so put the relevant
details for them in the property documentation. The target_sources()
command only needs to reference the properties, not reproduce
the property documentation.

Improve the cross-referencing between the HEADER_... property
docs. This helps build the mental picture of how they relate to
each other.
2022-03-05 17:33:36 +11:00
Brad King 7a8536e0ea Merge branch 'release-3.22' into release-3.23 2022-03-04 12:52:28 -05:00
Brad King 6e9eaf209d CMake 3.22.3 v3.22.3 2022-03-04 12:06:35 -05:00
Brad King 41d13ade7c Merge branch 'release-3.22' into release-3.23 2022-03-04 11:54:54 -05:00
Brad King e7c9304504 Merge branch 'release-3.21' into release-3.22 2022-03-04 11:54:30 -05:00
Brad King 78ae759e01 CMake 3.21.6 v3.21.6 2022-03-04 10:52:43 -05:00
Brad King 65da32c924 Merge topic 'file-set-name-requirements' into release-3.23
b357d334fc target_sources(): Enforce stricter requirements for FILE_SET name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7037
2022-03-04 09:09:31 -05:00
Brad King 31743aaf5d Merge topic 'file-set-multiple-names' into release-3.23
8c23ecbd93 target_sources(): Process multiple FILE_SET arguments per block

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7040
2022-03-04 09:07:03 -05:00
Brad King 8074e46a5c Merge topic 'ci-cuda-11.6' into release-3.23
1f601753d7 gitlab-ci: add jobs testing cuda11.6 with nvcc and clang 13
7716750062 ci: add cuda11.6 base image
77bdcc949d gitlab-ci: run CUDA and HIP test jobs in any non-MR pipeline

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7038
2022-03-04 09:02:24 -05:00
Brad King 2d0b70fbbe Merge branch 'release-3.22' into release-3.23 2022-03-04 08:56:21 -05:00
Brad King d7febfc727 Merge topic 'while-bug-compatibility' into release-3.23
da2361ffb3 while: Restore tolerance of condition error
47d197745a Tests: Simplify RunCMake.{if,while} unbalanced parenthesis cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7041
2022-03-04 08:53:16 -05:00
Brad King 71a8b4e63d Merge topic 'binutils-llvm-ar-clang-macos' into release-3.23
29ea94e17c BinUtils: Avoid llvm-ar on Apple platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7039
2022-03-04 08:52:05 -05:00
Brad King 5419cc3b8b Merge branch 'while-bug-compatibility' into release-3.22
Merge-request: !7041
2022-03-03 16:54:35 -05:00
Alex Turbov da2361ffb3 while: Restore tolerance of condition error
Since commit 880ca66b51 (Fix: `while()` can silently ignore incorrect
condition, 2021-08-09, v3.22.0-rc1~238^2~4) we correctly reject the
code

    set(paren "(")
    while(${paren})
    endwhile()

However, rejecting it breaks compatibility with projects that used such
code accidentally.  In CMake 3.21 and below, any error in the condition
was ignored because the `false` result exited the loop first.  Restore
tolerance of the error for now.  A policy will be needed to make it an
error later.

Note that the same condition with `if` was always correctly rejected.

Fixes: #22524
Issue: #23296
Co-authored-by: Brad King <brad.king@kitware.com>
2022-03-03 16:51:34 -05:00
Brad King 47d197745a Tests: Simplify RunCMake.{if,while} unbalanced parenthesis cases 2022-03-03 16:51:34 -05:00
Kyle Edwards 8c23ecbd93 target_sources(): Process multiple FILE_SET arguments per block
Fixes: #23287
2022-03-03 14:31:54 -05:00
Brad King 4331f97118 Merge branch 'release-3.21' into release-3.22 2022-03-03 12:58:14 -05:00
Brad King 7edc09b4f6 Merge branch 'binutils-llvm-ar-clang-macos' into release-3.22
Merge-request: !7039
2022-03-03 12:58:00 -05:00
Brad King e47e5c7959 Merge branch 'binutils-llvm-ar-clang-macos' into release-3.21
Merge-request: !7039
2022-03-03 12:55:33 -05:00
Brad King 29ea94e17c BinUtils: Avoid llvm-ar on Apple platforms
Since commit cf82300a63 (BinUtils: Clarify search logic and make it more
consistent, 2021-05-27, v3.21.0-rc1~119^2~2) we correctly prefer the
more-specific name `llvm-ar` over `ar` when using Clang.  However, on
Apple platforms, `llvm-ar` does not generate a symbol table that the
Apple linker accepts.  Fall back to `ar` on Apple platforms.

Fixes: #23269
2022-03-03 12:54:10 -05:00
Brad King 1f601753d7 gitlab-ci: add jobs testing cuda11.6 with nvcc and clang 13 2022-03-03 12:46:47 -05:00
Brad King 7716750062 ci: add cuda11.6 base image 2022-03-03 12:02:35 -05:00
Brad King 77bdcc949d gitlab-ci: run CUDA and HIP test jobs in any non-MR pipeline
Previously we only ran these in a scheduled nightly pipeline.
We should run them in pipelines on integration branches too,
particularly for the `release` branch.
2022-03-03 12:02:00 -05:00
Brad King 50b6744c66 Merge topic 'cuda-arch-all' into release-3.23
dae3ad08fa Tests: Add cases for CMAKE_CUDA_ARCHITECTURES={all,all-major}
5c1f5357b0 VS: Fix CUDA compiler id with CMAKE_CUDA_ARCHITECTURES={all,all-major}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7035
2022-03-03 11:48:00 -05:00
Brad King 77804f6358 Merge topic 'cmake-dir-args' into release-3.23
d2e9478321 Tests: Add RunCMake.CommandLine ExplicitiDirs explicit work directory
78e8f11456 cmake: Correct regression in `-B <dir> <src_dir>`
4091d5c58c Tests: Verify RunCMake.CommandLine ExplicitDirs source/build dirs
1b97f8f35c Tests: Clarify RunCMake.CommandLine ExplicitDirs case names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7030
2022-03-03 11:46:28 -05:00
Brad King 9c48040ffb Merge topic 'update-kwsys' into release-3.23
a20ad92022 KWSys: SystemInformation: Add Zhaoxin x86 processor kh40000

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7032
2022-03-03 11:42:28 -05:00
Kyle Edwards b357d334fc target_sources(): Enforce stricter requirements for FILE_SET name
Fixes: #23286
2022-03-03 10:17:10 -05:00