7794 Commits

Author SHA1 Message Date
Brad King
eb281d3454 CMake 3.31.1 2024-11-21 11:15:52 -05:00
Brad King
0576d076b1 Merge branch 'release-3.30' into release-3.31 2024-11-21 09:54:18 -05:00
Brad King
817707b904 CMake 3.30.6 2024-11-21 09:18:01 -05:00
Brad King
0349079e35 Merge branch 'release-3.30' into release-3.31 2024-11-21 09:12:04 -05:00
Brad King
66817bd07d Merge branch 'release-3.29' into release-3.30 2024-11-21 09:11:40 -05:00
Brad King
b47368e425 CMake 3.29.9 2024-11-21 08:34:26 -05:00
Craig Scott
62586f236c CMP0175: Do not reject USES_TERMINAL for add_custom_command(TARGET)
Fixes: #26449
2024-11-16 10:02:01 +11:00
Brad King
d44a201004 Help: Clarify instructions for using older VS toolsets with newer VS versions
Clarify that the newer version of VS must also be installed to use its
corresponding CMake generator.

Issue: #26446
2024-11-14 10:03:32 -05:00
Brad King
4f0eb0a41e Merge topic 'FindSQLite3-pkg-config' into release-3.31
2d228201fc Help: Guard calls to pkg_check_modules in cmake-developer(7) example
674a987898 FindSQLite3: Guard calls to pkg_check_modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9983
2024-11-12 10:16:46 -05:00
Peter Kokot
2d228201fc Help: Guard calls to pkg_check_modules in cmake-developer(7) example
This was missed in commit 25b947589a (Modules: Guard calls to
pkg_check_modules, 2024-08-07, v3.31.0-rc1~236^2).
2024-11-11 10:53:22 -05:00
Brad King
aae8d604d5 Help: Add missing one-line summary to policy CMP0132
This was missed in commit 05e510bf0b (CMP0132: Don't set compiler
environment variables on first run, 2022-03-23, v3.24.0-rc1~380^2).
2024-11-11 09:38:51 -05:00
Brad King
baceeb2c18 Merge topic 'aix-archive-shared-libraries' into release-3.31
4207687a5f Help: Update AIX_SHARED_LIBRARY_ARCHIVE for versioned shared objects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9954
2024-10-29 10:16:07 -04:00
Aditya Vidyadhar Kamath
4207687a5f Help: Update AIX_SHARED_LIBRARY_ARCHIVE for versioned shared objects
This was missed in commit dc8e4f8f0c (AIX: Enable versioned shared
objects with CMAKE_AIX_SHARED_LIBRARY_ARCHIVE, 2024-10-10,
v3.31.0-rc2~8^2).
2024-10-29 09:45:36 -04:00
Brad King
f4712b8af7 Merge topic 'doc-CMP0174' into release-3.31
6aa2e22300 Help: Add 3.31 release note for cmake_parse_arguments CMP0174

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9955
2024-10-29 09:39:24 -04:00
Peter Kokot
6aa2e22300 Help: Add 3.31 release note for cmake_parse_arguments CMP0174
This was left out by commit ceeea4e511 (cmake_parse_arguments: Set
variable if empty string given after keyword, 2024-08-18,
v3.31.0-rc1~175^2).
2024-10-28 09:51:27 -04:00
Craig Scott
c8567acc32 cmake_parse_arguments: Restore capture of value after repeated keyword
When a single-value keyword is repeated, and the first instance is
missing a value, it prevents the value from the second instance from
being stored in a variable. This was a regression introduced by
commit ceeea4e511 (cmake_parse_arguments: Set variable if empty string
given after keyword, 2024-08-18). That change also didn't create a
variable if the keyword was given but without a value. The purpose
of the change was to always define a variable if a keyword was given.
Lastly, that change didn't protect the CMP0174 logic to make it only
apply to the PARSE_ARGV form.

The first two of the above problems are fixed here by tracking the
keywords given instead of checking which keywords were missing
values. The third problem is also fixed here, being tightly coupled
to the same logic as the first two problems.

Fixes: #26397
2024-10-28 09:47:21 -04:00
Brad King
f42962bfbf Merge topic 'link-strategy' into release-3.31
39fd396421 LINK_LIBRARIES_STRATEGY: Rename strategies to clarify expectations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !9949
2024-10-28 09:14:39 -04:00
Brad King
39fd396421 LINK_LIBRARIES_STRATEGY: Rename strategies to clarify expectations
Since commit 7abd3137b7 (Linking: Optionally reorder direct dependencies
from LINK_LIBRARIES, 2024-09-19, v3.31.0-rc1~53^2) the strategy name
`PRESERVE_ORDER` has led users to expect that it strictly preserves
order.  While the part of the link line generation logic controlled by
`LINK_LIBRARIES_STRATEGY` does preserve order, it is not the last step.
Toolchain-specific de-duplication can cause the order to change on the
actual link line generated in the build system.

Rename the strategies:

* `PRESERVE_ORDER` => `REORDER_MINIMALLY`
* `REORDER`        => `REORDER_FREELY`

The new names make it clear that reordering is always possible, just to
varying degrees.  Update the `LINK_LIBRARIES_STRATEGY` documentation to
clarify that the strategies do not directly control the final link line.

Fixes: #26400
Issue: #26271
2024-10-25 10:23:37 -04:00
Brad King
7605228f5e codespell: Fix typos 2024-10-25 08:43:04 -04:00
Brad King
8e99e70297 Merge topic 'Help-CMAKE_LINK_DEPENDS_USE_LINKER' into release-3.31
686698a7b4 Help: Update note relative the GNU binutils linkers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9938
2024-10-25 08:13:02 -04:00
Marc Chevrier
686698a7b4 Help: Update note relative the GNU binutils linkers 2024-10-24 17:02:15 +02:00
Brad King
81f49865f2 Merge topic 'fix-path-search-doc' into release-3.31
630e4a12a3 Help: Fix find_package search order w.r.t. globs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Matthew Woehlke <matthew.woehlke@kitware.com>
Merge-request: !9930
2024-10-24 08:59:41 -04:00
Matthew Woehlke
630e4a12a3 Help: Fix find_package search order w.r.t. globs
Add documentation to clarify that `find_package` searches paths in the
specified order and stops at the first match.  Clarify documentation of
`CMAKE_FIND_PACKAGE_SORT_*` to match the actual behavior.

Note that no behavior is actually changed, this merely improves the
documentation to reflect actual behavior rather than seeming to imply
something else.

Also, update the test to verify that what we claim in the updated
documentation is what's actually happening.
2024-10-23 12:46:07 -04:00
Brad King
1e2b2b7fd2 Help: Clarify LINK_LIBRARIES_STRATEGY follow-up de-duplication
Extend discussion of the ``PRESERVE_ORDER`` example to prominently
explain how platform-specific behavior can affect generated link lines.

Closes: #26388
2024-10-23 10:09:22 -04:00
Craig Scott
1a119c5ad5 Help: Move LINK_LIBRARIES_STRATEGY details to target property docs
For cases where a CMAKE_XXX variable provides a default value for a
XXX target property, the convention used in the documentation is to
put the detailed explanation in the target property docs, leaving the
variable docs to be fairly minimal and cross-reference the target
property docs for details.

When the (CMAKE_)LINK_LIBRARIES_STRATEGY docs were first added,
they were the opposite of this convention, putting the details in the
variable docs instead of the property docs. This change moves the
details to the property docs to make it consistent with the prevailing
convention used elsewhere.
2024-10-19 10:38:10 +11:00
Brad King
98ccd8800a Merge topic 'doc-rel-3.31' into release-3.31
315a8f88cc Help: Add 3.31 release note for file(MAKE_DIRECTORY)'s RESULT option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9904
2024-10-15 13:57:26 -04:00
Brad King
c7e27f02e8 Merge topic 'doc-rel-3.29' into release-3.31
0e81c12483 Help: Add 3.29 release note for try_compile LINKER_LANGUAGE option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9905
2024-10-15 13:54:54 -04:00
Brad King
e3ebf4f5c0 Merge topic 'doc-rel-3.29' into release-3.30
0e81c12483 Help: Add 3.29 release note for try_compile LINKER_LANGUAGE option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9905
2024-10-15 13:34:08 -04:00
Brad King
0e81c12483 Help: Add 3.29 release note for try_compile LINKER_LANGUAGE option
In commit 0f37000304 (try_{compile,run}: add LINKER_LANGUAGE option,
2023-10-12, v3.29.0-rc1~567^2) a release note was accidentally added in
the wrong directory and so was not included in the 3.29 release notes.
2024-10-15 13:30:04 -04:00
Peter Kokot
315a8f88cc Help: Add 3.31 release note for file(MAKE_DIRECTORY)'s RESULT option
In commit 95323c90a1 (file(MAKE_DIRECTORY): Add optional RESULT keyword
to capture failure., 2024-06-16, v3.31.0-rc1~414^2) the release note was
added in the wrong directory so it was not gathered for the 3.31 release.

Fixes: #26377
2024-10-15 13:27:30 -04:00
Brad King
b866eb8458 Help/dev: Add maintainer guide release branch creation to use a MR for CI
Provide a way to run CI with a new release version number
before merging it.
2024-10-09 11:59:51 -04:00
Brad King
801c94085f Help: Drop development topic notes to prepare release
Release versions do not have the development topic section of
the CMake Release Notes index page.
2024-10-09 10:01:05 -04:00
Brad King
aa6bbc3135 Help: Update Sphinx versionadded directives for 3.31 release
Run the script:

    Utilities/Sphinx/update_versions.py --since v3.30.0 --overwrite
2024-10-09 09:32:54 -04:00
Brad King
738cf491d4 Help: Organize and revise 3.31 release notes
Add section headers similar to the 3.30 release notes and move each
individual bullet into an appropriate section.  Revise a few bullets.
2024-10-09 09:32:21 -04:00
Brad King
fae66f4751 Help: Consolidate 3.31 release notes
Run the `Utilities/Release/consolidate-relnotes.bash` script to move
notes from `Help/release/dev/*` into `Help/release/3.31.rst`.
2024-10-09 09:32:02 -04:00
Craig Scott
e5a9ccbcc8 project: Always set <PROJECT-NAME>_* as normal variables
Re-introduce the behavior originally introduced in CMake 3.30.3 by
commit c1ece78d11 (project: non cache <project> prefix variables are
also created, 2024-08-27, v3.30.3~2^2), but this time with a policy for
compatibility.

Issue: #25714
Issue: #26243
2024-10-08 10:07:11 -04:00
Brad King
ddf1d2944f Merge branch 'release-3.30' 2024-10-08 09:23:28 -04:00
Brad King
9c4a0a9ff0 CMake 3.30.5 2024-10-08 08:56:04 -04:00
Brad King
51eb713098 Merge topic 'FindOpenMP-CUDA-Clang'
a4b60d948d FindOpenMP: Add support for CUDA when compiling with Clang

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9886
2024-10-08 08:49:03 -04:00
Brad King
dc371e07fb Merge topic 'project-vars'
fa07ddfebf project: Only check non-cache vars when setting project vars

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9883
2024-10-08 08:45:26 -04:00
Brad King
a4b60d948d FindOpenMP: Add support for CUDA when compiling with Clang 2024-10-07 14:19:08 -04:00
Craig Scott
fa07ddfebf project: Only check non-cache vars when setting project vars
The change in commit 86ad7cc886 (project: Only define non-cache vars if
already defined, 2024-09-15, v3.30.4~2^2) was meant to only check for
non-cache variables when deciding whether to set non-cache project
variables for the current call.  However, it erroneously checked for any
variable, including cache variables.  This gives the intended result on
the first run, but on subsequent runs a cache variable will exist that
did not on the first run, leading to different behavior between the two
runs.  Fix the logic to only check for a pre-existing non-cache
variable, as was originally intended.

Fixes: #26355
2024-10-07 10:24:37 -04:00
Brad King
5b7ab1818b Merge topic 'cmake--workflow-preset'
b80aa1d3a3 preset: Easier command line interface for Workflow Presets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9866
2024-10-07 09:11:48 -04:00
Brad King
9a14348a2c Merge topic 'GoogleTest-DISCOVERY_EXTRA_ARGS'
2dcba446e2 GoogleTest: Add DISCOVERY_EXTRA_ARGS to gtest_discover_tests()
f55f9fd5c1 Help: Mention TEST_LIST with gtest_discover_tests() can omit tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9856
2024-10-07 09:10:44 -04:00
Kevin Tolle
b80aa1d3a3 preset: Easier command line interface for Workflow Presets
A positional option allows 'cmake --workflow --preset <preset>' to be
shortened to 'cmake --workflow <preset>'.

Fixes: #26270
2024-10-05 16:08:44 +10:00
Brad King
d734f8dc6d Merge topic 'deprecate-pre-3.10'
84db8506ff Deprecate compatibility with CMake versions older than 3.10
9e3b559b6a Tests: Update cmake_minimum_required versions to 3.10
f4aa34daa7 Tests/RunCMake: Update cmake_minimum_required versions to 3.10
1d38d52995 Tests/RunCMake: Match diagnostic line numbers more robustly
55778f5a16 ExternalProject: Enable all policies in internal scripts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9875
2024-10-04 10:26:23 -04:00
Brad King
3b2b5ca096 Merge topic 'cpack-deb-depends-list'
443a06807c CPackDeb: always treat PACKAGE_DEPENDS as a list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9873
2024-10-04 09:16:56 -04:00
Cedric Martineau
2dcba446e2 GoogleTest: Add DISCOVERY_EXTRA_ARGS to gtest_discover_tests()
Fixes: #26261
Co-authored-by: Craig Scott <craig.scott@crascit.com>
2024-10-04 18:12:30 +10:00
Brad King
84db8506ff Deprecate compatibility with CMake versions older than 3.10
Issue a deprecation warning on calls to `cmake_minimum_required` or
`cmake_policy` that set policies based on versions older than 3.10.
Note that the effective policy version includes `...<max>` treatment.
Update the check from commit 3a4791548d (Deprecate compatibility with
CMake versions older than 3.5, 2023-02-09, v3.27.0-rc1~508^2).
2024-10-03 14:18:26 -04:00
Edoardo Bortolozzo
443a06807c CPackDeb: always treat PACKAGE_DEPENDS as a list
Remove some edge cases where if CPACK_DEBIAN_PACKAGE_DEPENDS is a list
it would not be expanded on all components leaving some with ';'(s) in
the Depends field of the control file.
Same goes for using CPACK_DEBIAN_PACKAGE_SHLIBDEPS.
2024-10-03 08:52:14 -04:00