Commit Graph

32044 Commits

Author SHA1 Message Date
Brad King 89457cb8f0 Merge topic 'file-set-name-requirements'
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:33 -05:00
Brad King 0d8bb14344 Merge topic 'file-set-multiple-names'
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:04 -05:00
Brad King bb2477081d Merge topic 'while-bug-compatibility'
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:17 -05:00
Kitware Robot 5450255579 CMake Nightly Date Stamp 2022-03-04 00:01:14 -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
Kyle Edwards 8c23ecbd93 target_sources(): Process multiple FILE_SET arguments per block
Fixes: #23287
2022-03-03 14:31:54 -05:00
Brad King c5ab0ea1fa Merge topic 'cmake-dir-args'
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:29 -05:00
Brad King 67fc1d74e3 Merge topic 'update-kwsys'
1b256a6bbf Merge branch 'backport-kwsys-SystemInformation-zhaoxin-kh40000'
a20ad92022 KWSys: SystemInformation: Add Zhaoxin x86 processor kh40000
17b4fa5dab Merge branch 'upstream-KWSys' into update-kwsys
9deb2d6013 KWSys 2022-03-02 (d3bbb6b7)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7032
2022-03-03 11:42:29 -05:00
Kyle Edwards b357d334fc target_sources(): Enforce stricter requirements for FILE_SET name
Fixes: #23286
2022-03-03 10:17:10 -05:00
Kitware Robot 9b628e9ebb CMake Nightly Date Stamp 2022-03-03 00:01:20 -05:00
Robert Maynard 78e8f11456 cmake: Correct regression in -B <dir> <src_dir>
Fixes: #23285
2022-03-02 12:21:16 -05:00
Brad King cd6341b547 Merge topic 'cuda-arch-all'
2796d6eeca CUDA: Fix CMAKE_CUDA_ARCHITECTURES=all/all-major with NVCC 11.5+
e450d55552 Help: Update CUDA_ARCHITECTURES docs for generic all/all-major support
fe64c49e72 CUDA: Simplify CMAKE_CUDA_ARCHITECTURES special value logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7026
2022-03-02 07:52:18 -05:00
Brad King 04a7200c75 Merge topic 'cuda-arch-all' into release-3.23
2796d6eeca CUDA: Fix CMAKE_CUDA_ARCHITECTURES=all/all-major with NVCC 11.5+
e450d55552 Help: Update CUDA_ARCHITECTURES docs for generic all/all-major support
fe64c49e72 CUDA: Simplify CMAKE_CUDA_ARCHITECTURES special value logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7026
2022-03-02 07:52:17 -05:00
Brad King 63a461d818 Merge topic 'windows-symlink-dir'
5101d586c4 Windows: Prefer junctions for directory symlinks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7013
2022-03-02 07:51:00 -05:00
Brad King 1c2e678f99 Merge topic 'find_file_frameworks_debug_output'
3354d52e3d find_file: Fix blank line instead of framework path in debug output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7024
2022-03-02 07:46:58 -05:00
Brad King 4b9227e718 Merge topic 'find_file_frameworks_debug_output' into release-3.23
3354d52e3d find_file: Fix blank line instead of framework path in debug output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7024
2022-03-02 07:46:57 -05:00
Brad King 1ed1edbfd1 Merge topic 'file-set-no-custom-targets'
ad41c9cd11 target_sources(): Prohibit FILE_SET on custom targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7027
2022-03-02 07:45:58 -05:00
Brad King 17b4fa5dab Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2022-03-02 (d3bbb6b7)
2022-03-02 07:25:28 -05:00
Kitware Robot 0a4da33f8c CMake Nightly Date Stamp 2022-03-02 00:01:16 -05:00
Sergei Kryvonos 5101d586c4 Windows: Prefer junctions for directory symlinks
Update the approach added by commit afb7f6e4ff (cmake: Add '-E
create_symlink' support on Windows, 2018-06-11, v3.13.0-rc1~75^2) to use
junctions, as suggested [here](https://superuser.com/a/1291446/140450).
This allows them to work under security limitations on Windows.

Fixes: #23257
2022-03-01 08:48:46 -05:00
Brad King 82b8bd4ef9 Merge topic 'symlink-build-under-source'
d33b12d84b Add support for build tree symlink inside source tree
43416c48ed cmOutputConverter: Always set relative path top source and binary together
de766bc7e0 Xcode: Fix support for source tree symlink inside build tree
55db2cf1e5 Makefiles: Fix "make depend" with add_custom_command DEPFILE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7020
2022-03-01 08:47:16 -05:00
Brad King d687047f99 Merge topic 'genex-LINK_GROUP'
0a81ea1f12 Genex-LINK_GROUP: Add possibility to group libraries at link step
a9928eb4a5 SunPro C: ensure LINKER: prefix is usable for all versions
01ff75b2ff cmComputeDepends::LinkEntry: introduce enum to specify item type

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7005
2022-03-01 08:46:09 -05:00
Kitware Robot eb69a65998 CMake Nightly Date Stamp 2022-03-01 00:01:29 -05:00
Brad King fe64c49e72 CUDA: Simplify CMAKE_CUDA_ARCHITECTURES special value logic
Refactor the logic checking `CMAKE_CUDA_ARCHITECTURES` special values.
Switch on the value first, and then make other decisions for each case.
This makes room for other special values to be added later.
2022-02-28 21:30:23 -05:00
Craig Scott 3354d52e3d find_file: Fix blank line instead of framework path in debug output
There's no point printing a blank line if FindHeaderInFramework()
returns an empty string. Pass in the debug object to that function
instead so it can record the actual paths it tests in the debug output
directly.
2022-03-01 09:28:22 +11:00
Kyle Edwards ad41c9cd11 target_sources(): Prohibit FILE_SET on custom targets
Fixes: #23262
2022-02-28 17:21:04 -05:00
Brad King d33b12d84b Add support for build tree symlink inside source tree
Since commit c564a3e3ff (Ninja: Always compile sources using absolute
paths, 2021-05-19, v3.21.0-rc1~129^2), both the Ninja and Makefile
generators pass source files and include directories to the compiler as
absolute paths.  However, in some other contexts within generated build
systems, we generate paths that may be relative or absolute.  In these
contexts, we prefer relative paths, but avoid them when they contain a
`../` sequence that leaves both the build tree and the source tree:

* When the build tree is outside of the source tree, all paths to the
  source tree are absolute.

* When the build tree is inside the source tree, we previously assumed
  that it is a real directory such that exiting the build tree with
  `../` enters the source tree.  This allowed paths to the source
  tree to be relative to the build tree.

In the latter case, we previously did not support using a symbolic link
inside the source tree to point at the build tree.  This is because
relative paths to the source tree would be generated with `../`
sequences leaving the build tree, but they would jump to the parent of
the real build tree, which is not the source tree.

Fix this by requiring that `../` sequences stay inside the build tree
even if its path appears to be inside the source tree.  When the build
tree is inside the source tree, all paths to the source tree are now
absolute.  For consistency, this applies regardless of whether the
path to the build tree contains a symbolic link.

Fixes: #21819
2022-02-28 10:26:04 -05:00
Brad King 43416c48ed cmOutputConverter: Always set relative path top source and binary together
Refactor to set both at once so we have a single place in the code that
knows both have been set.
2022-02-28 10:25:18 -05:00
Brad King de766bc7e0 Xcode: Fix support for source tree symlink inside build tree
Since commit 61495cdaae (Fix Xcode project references to the source
tree, 2009-09-22, v2.8.0~43) we force source file references to use
relative paths from the source tree.  If the source tree path is a
symbolic link inside the build tree, the relative `../` sequence
goes to the wrong place.  The problem with debug breakpoints motivating
that change does not seem to occur in modern Xcode versions, so update
the logic to use a relative path only when it does not need to start
in any `../` sequence.
2022-02-28 10:24:34 -05:00
Brad King 55db2cf1e5 Makefiles: Fix "make depend" with add_custom_command DEPFILE
Since commit cfd8a5ac1f (Makefiles: Add support of DEPFILE for
add_custom_command, 2020-12-04, v3.20.0-rc1~237^2~1) we store in
`CMAKE_DEPENDS_DEPENDENCY_FILES` an empty string as the source file with
which the dependencies of a custom command depfile are associated. When
this list is later expanded by `make depend`, the empty element is
removed and breaks list indexing.  Fix the list expansion to preserve
empty elements.
2022-02-28 09:46:59 -05:00
Marc Chevrier 0a81ea1f12 Genex-LINK_GROUP: Add possibility to group libraries at link step
Fixes: #23121
2022-02-28 10:26:26 +01:00
Kitware Robot 708067d7b6 CMake Nightly Date Stamp 2022-02-28 00:01:16 -05:00
Kitware Robot a2513bb55e CMake Nightly Date Stamp 2022-02-27 00:01:09 -05:00
Kitware Robot 3a169af952 CMake Nightly Date Stamp 2022-02-26 00:01:16 -05:00
Brad King d4ad5fcd5d Merge topic 'ninja-gfortran-preprocess'
6b4885b58b Ninja: Avoid preprocessing twice with explicit Fortran_PREPROCESS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7008
2022-02-25 08:07:36 -05:00
Marc Chevrier 01ff75b2ff cmComputeDepends::LinkEntry: introduce enum to specify item type 2022-02-25 11:08:17 +01:00
Kitware Robot c515ac41ee CMake Nightly Date Stamp 2022-02-25 00:01:17 -05:00
Brad King 9568325cf4 Merge topic 'cpack-zstd-parallel'
525faec4e9 CPack: Add parallel zstd compression
215c4efd3e cmArchiveWrite: Factor out thread count selection
29f63129be CPack: Format CPACK_THREADS compression methods as a definition list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7003
2022-02-24 12:57:32 -05:00
Brad King 39a3c3eda3 Merge topic 'zero_check_proj'
a334f1b906 VS: Write ZERO_CHECK.proj for VS19 and above

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7010
2022-02-24 12:55:40 -05:00
Peter Hill 6b4885b58b Ninja: Avoid preprocessing twice with explicit Fortran_PREPROCESS
Fix spurious warnings from gfortran+Ninja for preprocessing.

Fixes: #23248
2022-02-24 12:54:46 -05:00
Kitware Robot dd9edd99a4 CMake Nightly Date Stamp 2022-02-24 00:01:17 -05:00
Brad King 352ea99bba CMake 3.23.0-rc2 2022-02-23 09:22:31 -05:00
Russell Greene 525faec4e9 CPack: Add parallel zstd compression 2022-02-23 08:39:32 -05:00
Russell Greene 215c4efd3e cmArchiveWrite: Factor out thread count selection
Prepare to use it for more than one compression method.
2022-02-23 08:39:10 -05:00
Kitware Robot 1e2f8bd9db CMake Nightly Date Stamp 2022-02-23 00:01:16 -05:00
Brad King d985c12fa4 Merge topic 'ghs_build_event_bugfix'
6acf06a2cd GHS: fix build event script error on Linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7002
2022-02-22 12:59:05 -05:00
Brad King 6068143fe1 Merge topic 'update-kwsys'
f634e77b2e Merge branch 'upstream-KWSys' into update-kwsys
8d9ced350d KWSys 2022-02-18 (599dc923)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7004
2022-02-22 12:58:22 -05:00
Brad King 8bbca4ecf9 Merge topic 'cuda-archs'
f75299b803 CUDA: Restore support for non-"all" CUDA_ARCHITECTURES with nvcc 11.5+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7007
2022-02-22 12:56:51 -05:00
Kitware Robot d8e3796368 CMake Nightly Date Stamp 2022-02-22 00:01:08 -05:00
Kitware Robot 7847a44930 CMake Nightly Date Stamp 2022-02-21 00:01:17 -05:00