Commit Graph

36237 Commits

Author SHA1 Message Date
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
5c7a55edc2 cmStringAlgorithms: Fix core.NonNullParamChecker diagnostic in cmAlphaNum 2024-10-26 06:01:09 -04:00
Brad King
51ed0eba18 KWSys: SystemInformation: Add missing EOF check when reading /proc/cpuinfo
Backport KWSys upstream commit `6e847d08b` (SystemInformation: Add
missing EOF check when reading /proc/cpuinfo, 2024-10-23) to the
CMake 3.31 release branch.
2024-10-26 06:01:09 -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
ebd038613e Merge topic 'windows-kernel-mode-driver' into release-3.31
54bbd00448 WindowsKernelModeDriver: Switch to appending to variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9941
2024-10-25 08:21:32 -04:00
Joseph Snyder
54bbd00448 WindowsKernelModeDriver: Switch to appending to variables
When using the WindowsKernelModeDriver, do not add the new paths
if the variable was not previously defined.  Instead, append them
to the existing value.

Add a new GUID for the Experimental mode gate
2024-10-24 13:20:08 -04:00
Marc Chevrier
0619c064ff Linker configuration: enhance usability
The linker configuration file is now optional: It is loaded only if
variable CMAKE_<LANG>_USE_LINKER_CONFIGURATION is set to TRUE.

The file CMakeAddNewLanguage.txt is updated to take into account the
linker configuration.

Fixes: #26393
2024-10-24 16:37:30 +02:00
Matthew Woehlke
f04dd93c47 cmExportPackageInfoGenerator: Fix version properties
Fix a small bug in cmExportPackageInfoGenerator that caused extended
version properties ("compat_version", "version_schema")) to be emitted
when empty. Add a test to ensure this is working as intended.

Fixes: #26264
2024-10-17 14:57:38 -04:00
Brad King
773eff6d8e CMake 3.31.0-rc2 2024-10-17 09:01:08 -04:00
Brad King
262c277197 Revert "Ensure imported targets in sibling dirs are deduplicated"
Revert commit 502610733f (Ensure imported targets in sibling dirs are
deduplicated, 2024-09-15, v3.31.0-rc1~92^2).  Also revert the change
from a copy of the logic made by commit cd418d4bb6 (Static libraries
de-duplication: keep first occurrence, 2024-09-29, v3.31.0-rc1~30^2).
The logic was de-duplicating based on the target name rather than based
on the library file path.

Fixes: #26371
Issue: #26284
2024-10-16 16:49:27 -04:00
Brad King
093a9dac38 Merge topic 'vs-fortran-ipo' into release-3.31
a36df0220f VS: Honor INTERPROCEDURAL_OPTIMIZATION for Fortran targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9899
2024-10-15 10:31:00 -04:00
Pavel Liavonau
a36df0220f VS: Honor INTERPROCEDURAL_OPTIMIZATION for Fortran targets
Also map `-Qipo` to its `.vfproj` attribute.

Fixes: #26361
2024-10-14 10:17:12 -04:00
Aditya Vidyadhar Kamath
dc8e4f8f0c AIX: Enable versioned shared objects with CMAKE_AIX_SHARED_LIBRARY_ARCHIVE
Closes: #26358
2024-10-10 14:00:59 -04:00
Brad King
7fb05af311 cmGeneratorTarget: Simplify AIX shared library archive name computation 2024-10-10 13:18:01 -04:00
Brad King
e12e5e0566 cmGeneratorTarget: Simplify ComputeVersionedName signature 2024-10-10 13:10:13 -04:00
Brad King
3dcb06e956 CMake 3.31.0-rc1 2024-10-10 09:39:31 -04:00
Brad King
b062c18c64 Begin 3.31 release versioning 2024-10-09 10:02:30 -04:00
Brad King
a71652496a Merge topic 'project-vars-policy'
e5a9ccbcc8 project: Always set <PROJECT-NAME>_* as normal variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9879
2024-10-09 09:20:57 -04:00
Kitware Robot
5d58adf282 CMake Nightly Date Stamp 2024-10-09 00:01:23 -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
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
Kitware Robot
1de987a7e9 CMake Nightly Date Stamp 2024-10-08 00:01:12 -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
Kitware Robot
2086ddf27e CMake Nightly Date Stamp 2024-10-07 00:02:40 -04:00
Kitware Robot
943fd14320 CMake Nightly Date Stamp 2024-10-06 00:02:00 -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
Kitware Robot
581be8a0fd CMake Nightly Date Stamp 2024-10-05 00:01:32 -04: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
Kitware Robot
f296e7c85b CMake Nightly Date Stamp 2024-10-04 00:01:20 -04: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
Brad King
951122dd56 Merge topic 'aix-rpath-padding'
3e5b9229e0 AIX: Fix XCOFF editor to avoid duplicating standard libpath entries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9865
2024-10-03 08:10:27 -04:00
Brad King
e78ae03893 Merge topic 'cmake-host-executable-suffix'
5d2b89d5fa Add CMAKE_HOST_EXECUTABLE_SUFFIX for Unix/Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: shiz01 <shiz01@tutanota.com>
Merge-request: !9863
2024-10-03 08:07:39 -04:00
Brad King
1ee630e06f Merge topic 'static-libraries-deduplication'
cd418d4bb6 Static libraries de-duplication: keep first occurrence
9b5c805bf6 Tests/RunCMake/LinkLibrariesStrategy: Check ordering results more strongly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9864
2024-10-03 08:06:39 -04:00
Brad King
31db1a047e Merge topic 'ctest-sp-recursion'
f3dcbfaa8c CTest: Avoid infinite recursion with -SP option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9870
2024-10-03 08:05:11 -04:00
Kitware Robot
6849604dd2 CMake Nightly Date Stamp 2024-10-03 00:01:18 -04:00
leha-bot
5d2b89d5fa Add CMAKE_HOST_EXECUTABLE_SUFFIX for Unix/Windows
Closes: #17553
2024-10-02 10:39:40 -04:00
Marc Chevrier
cd418d4bb6 Static libraries de-duplication: keep first occurrence
Fixes: #26335
2024-10-02 10:17:08 -04:00
Aditya Vidyadhar Kamath
3e5b9229e0 AIX: Fix XCOFF editor to avoid duplicating standard libpath entries
The `/usr/lib` and `/lib` entries need to be present, but do not need to
be at the end.  Avoid appending extra copies of the entries if they
already exist.

Closes: #26275
2024-10-02 08:48:32 -04:00
Brad King
823e0a3a61 Merge topic 'preserve-empty-args-test-command-lines'
fc7aa3cd69 tests: Preserve empty arguments in test command lines
9f1703530b Help: Add pre-test to prose for gtest_discover_tests()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9575
2024-10-02 08:11:57 -04:00
Brad King
d8bdc9f3af Merge topic 'vs-tool-override-fix'
55831faf5b VS: Honor VS_TOOL_OVERRIDE for known source file types too

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9851
2024-10-02 08:09:33 -04:00
Daniel Pfeifer
f3dcbfaa8c CTest: Avoid infinite recursion with -SP option
This was broken since 49a37d5a97.
2024-10-02 11:37:10 +02:00
Kitware Robot
ffe0781106 CMake Nightly Date Stamp 2024-10-02 00:01:17 -04:00
Craig Scott
fc7aa3cd69 tests: Preserve empty arguments in test command lines
This will now preserve empty values in the TEST_LAUNCHER and
CROSSCOMPILING_EMULATOR target properties for tests added by:

- The add_test() command.
- The ExternalData_Add_Test() command from the ExternalData module.
- The gtest_add_tests() or gtest_discover_tests() commands from the
  GoogleTest module.

For the gtest_add_tests() and gtest_discover_tests() commands,
empty elements in the values passed after the EXTRA_ARGS keyword
are also now preserved.

Policy CMP0178 is added to provide backward compatibility with the
old behavior where empty values were silently discarded from the
above cases.

Fixes: #26337
2024-10-02 10:09:11 +10:00
Darragh Coy
55831faf5b VS: Honor VS_TOOL_OVERRIDE for known source file types too
Visual Studio Generator: The `VS_TOOL_OVERRIDE` source file property
would previously only be respected for file types that CMake didn't know
how to build out of the box. This change allows the user to override how
any source file is built with a custom build tool, even ones with
standard/recognized extensions such as `.cxx`, `.idl`, etc.

Fixes: #26336
2024-10-01 14:00:00 -04:00
Kitware Robot
d0ad8fd49c CMake Nightly Date Stamp 2024-10-01 00:01:13 -04:00
Brad King
f63823ed15 Merge topic 'ctestxml-cpu-model-name'
f5af492178 CTest: Report CPU model name to dashboard

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9860
2024-09-30 09:55:31 -04:00
Brad King
e36e11996f Merge topic 'enable-ssl-automatically'
c462d9243b CYGWIN,MSYS: Build CMake with OpenSSL by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9858
2024-09-30 09:49:50 -04:00
Brad King
98402581f4 Merge topic 'aix-archive-shared-libraries'
6c12e0758b Ninja: Fix AIX shared library archiving

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9857
2024-09-30 09:48:21 -04:00