Commit Graph

2751 Commits

Author SHA1 Message Date
Brad King
a7b325e203 Merge topic 'verify-header-sets'
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
2022-03-30 09:10:25 -04:00
Kyle Edwards
c798744f81 FILE_SET: Add VERIFY_HEADER_SETS target property
Fixes: #23338
2022-03-29 13:58:27 -04:00
Craig Scott
05e510bf0b CMP0132: Don't set compiler environment variables on first run
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
2022-03-29 09:42:59 -04:00
Brad King
25b9fb0b1a Merge topic 'link-interface-direct'
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
2022-03-25 09:12:39 -04:00
Brad King
96420a4afd Merge topic 'cmake-fresh'
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
2022-03-25 09:09:56 -04:00
Brad King
cf312a2e54 LINK_LIBRARIES: Add support for LINK_ONLY genex
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`.
2022-03-24 08:23:55 -04:00
Kasper Laudrup
0b7fd783f8 cmake -E tar: Add --touch option
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
2022-03-23 14:41:34 +01:00
Brad King
c4d16c4964 Merge topic 'LINK_GROUP-feat-RESCAN-on-BSD-systems'
d658332782 Genex-LINK_GROUP: Add support feature RESCAN on BSD systems

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7104
2022-03-23 09:30:29 -04:00
Brad King
6ab75f4c44 Merge topic 'revert-link-interface-direct-for-3.23'
75c701f66f Help: Update INTERFACE_LINK_LIBRARIES_DIRECT to be added in 3.24
0a35b70c24 Merge branch 'revert-link-interface-direct-for-3.23'
687a91967f Revert INTERFACE_LINK_LIBRARIES_DIRECT feature for 3.23 branch

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7098
2022-03-22 11:56:44 -04:00
Brad King
9f1471739d cmake: Add --fresh option to clear the cache and start from scratch
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
2022-03-22 09:27:47 -04:00
Brad King
75c701f66f Help: Update INTERFACE_LINK_LIBRARIES_DIRECT to be added in 3.24
This feature has been reverted from the 3.23 release branch.
Update its documentation and release note to target 3.24 instead.

Issue: #22496
2022-03-22 09:14:55 -04:00
Brad King
0a35b70c24 Merge branch 'revert-link-interface-direct-for-3.23'
Use the "ours" merge strategy because we only want to revert the change
from the 3.23 branch, not from `master`.  It will be revised for
inclusion in a future release series.

Manually remove the 3.23 release note that would have been removed by
this merge without the "ours" strategy.
2022-03-22 09:13:43 -04:00
Brad King
7e36fcd745 Merge topic 'doc-productbuild'
bf44efadab Help: Add more detail for CPACK_PRODUCTBUILD_DOMAINS* variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7091
2022-03-22 08:42:20 -04:00
Marc Chevrier
d658332782 Genex-LINK_GROUP: Add support feature RESCAN on BSD systems 2022-03-22 11:36:10 +01:00
Brad King
7e642a6fa0 Merge topic 'ghs_predefined_targets'
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
2022-03-21 14:36:42 -04:00
Brad King
a4b04e62fc Merge topic 'LINK_LIBRARY-WHOLE_ARCHIVE'
dabe56de58 genex-LINK_LIBRARY: Add feature WHOLE_ARCHIVE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: huangqinjin <huangqinjin@gmail.com>
Merge-request: !7064
2022-03-21 14:35:59 -04:00
Brad King
687a91967f Revert INTERFACE_LINK_LIBRARIES_DIRECT feature for 3.23 branch
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
2022-03-21 13:17:32 -04:00
Craig Scott
bf44efadab Help: Add more detail for CPACK_PRODUCTBUILD_DOMAINS* variables 2022-03-21 12:25:34 +11:00
Brad King
fccb5a5152 Merge topic 'doc-multiple-src-paths'
1b8669c1d6 Help: Document warning about multiple source paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7082
2022-03-18 08:21:40 -04:00
Brad King
1b8669c1d6 Help: Document warning about multiple source paths
Although passing multiple source paths was never documented, it was not
diagnosed by CMake 3.22 and below.  In CMake 3.23 we now diagnose extra
paths and warn.  Document this change and add a release note.

Issue: #23334
2022-03-18 07:39:22 -04:00
Fred Baksik
399e73b89a GHS: release note 2022-03-17 19:41:15 -04:00
Marc Chevrier
dabe56de58 genex-LINK_LIBRARY: Add feature WHOLE_ARCHIVE 2022-03-17 23:07:59 +01:00
Peter Würth
185723461f FindZLIB: more library names + option to prefer static library
Adds additional library names `zlibstat[d]` and `zlibvc[d]` for Windows,
when zlib is built using one of the Visual Studio solutions under
`zlib/contrib/vstudio`.

Adds a `ZLIB_USE_STATIC_LIBS` option that is equivilent to similar
settings in other modules such as FindProtobuf, FindOpenSSL, etc.

Implements #18029 and #23140
2022-03-12 17:55:57 +01:00
Brad King
96b7ca3576 Merge topic 'find_package-global-imported'
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
2022-03-11 08:54:36 -05:00
John Parent
2f1ffa003c find_package: Add support for default GLOBAL imported targets
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.
2022-03-10 12:44:36 -05:00
Brad King
d1b48bfabd CUDA: Add support for CUDA_ARCHITECTURES=native
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
2022-03-10 09:27:29 -05:00
Brad King
51e81d1f73 Merge topic 'color-diagnostics'
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
2022-03-09 12:15:53 -05:00
Semyon Kolton
78adb1b952 color: Add CMAKE_COLOR_DIAGNOSTICS environment variable 2022-03-08 16:38:13 -05:00
Semyon Kolton
884d9de8b7 color: Introduce CMAKE_COLOR_DIAGNOSTICS variable
Add a variable to control both makefile color messages and compiler
color diagnostics.

Fixes: #15502
2022-03-08 16:37:08 -05:00
Brad King
28f8b5cb0c Merge topic 'cmake-presets-file-dir'
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:15 -05:00
Kyle Edwards
f54507c2f6 CMakePresets.json: Add ${fileDir} macro
Fixes: #23214
2022-03-07 18:03:16 -05:00
Brad King
49642079e5 Merge topic 'LINK_LIBRARY-libraries'
9fb1dff070 LINK_LIBRARY: Add features for library support on Apple
93a153bc7f Genx-LINK_LIBRARY: simplify framework features definitions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7029
2022-03-07 10:04:13 -05:00
Brad King
7e807479ff Merge topic 'LINK_GROUP-rescan-static-libs'
b0fada9964 Genex-LINK_GROUP: Add feature RESCAN

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7044
2022-03-07 10:03:36 -05:00
Marc Chevrier
9fb1dff070 LINK_LIBRARY: Add features for library support on Apple 2022-03-05 13:57:45 +01:00
Marc Chevrier
b0fada9964 Genex-LINK_GROUP: Add feature RESCAN
Feature RESCAN can be used to manage circular references between
static libraries.
2022-03-05 12:40:26 +01:00
Brad King
30313aa721 while: diagnose errors during condition evaluation
Add a policy to diagnose condition errors in a compatible way.

Fixes: #23296
2022-03-04 13:55:12 -05:00
Brad King
7a8536e0ea Merge branch 'release-3.22' into release-3.23 2022-03-04 12:52:28 -05:00
Brad King
4dfc166976 Merge branch 'release-3.22' 2022-03-04 12:52:03 -05:00
Brad King
6e9eaf209d CMake 3.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
76096a0ef4 Merge branch 'release-3.21' 2022-03-04 11:46:13 -05:00
Brad King
78ae759e01 CMake 3.21.6 2022-03-04 10:52:43 -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
Russell Greene
525faec4e9 CPack: Add parallel zstd compression 2022-02-23 08:39:32 -05:00
Marc Chevrier
397ee55cd6 genex-LINK_LIBRARY: rename configuration variables
To be more consistent between genex and variables as well as
the forecomming LINK_GROUP genex, rename variable *_LINK_USING_<FEATURE>*
in *_LINK_LIBRARY_USING_<FEATURE>*
2022-02-16 18:34:28 +01:00
Brad King
731bdec8b9 Merge topic 'vs-package-restore-docs'
d92469e572 Help: Clarify how package resolve mode is intended to be used
f320a31087 cmake --build: prioritize --resolve-package-references over preset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6984
2022-02-16 09:41:03 -05:00
Brad King
c46ed01fa0 Merge topic 'file-download-range'
231872ddb0 file(DOWNLOAD): Add options to download a range

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6986
2022-02-16 09:37:33 -05:00
m.klimenko
231872ddb0 file(DOWNLOAD): Add options to download a range 2022-02-15 22:08:06 +03:00
Carsten Rudolph
d92469e572 Help: Clarify how package resolve mode is intended to be used
Fixes: #23223
2022-02-15 10:20:14 -05:00