11433 Commits

Author SHA1 Message Date
Brad King
35e908e0dc Merge topic 'swift-install-names' into release-3.30
8669176576 Swift: Fix INSTALL_NAME_DIR under CMP0157 NEW behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9692
2024-08-02 09:47:50 -04:00
Evan Wilde
8669176576 Swift: Fix INSTALL_NAME_DIR under CMP0157 NEW behavior
Setting `CMAKE_INSTALL_NAME_DIR` or the `INSTALL_NAME_DIR` on Swift
targets had no effect when CMP0157 was set to `NEW`.  This was a result
of missing the `<TARGET_INSTALLNAME_DIR>` before the `<TARGET_SONAME>`.
Fix that and add a test to verify that the install name directory is
included in the install name.

Fixes: #26175
2024-08-01 10:49:36 -04:00
Brad King
369052b5d8 Tests: Restore suppression of xcodebuild error with Xcode Command-Line Tools
In commit 40fa2c1c90 (Tests: Cleanup CMake_TEST_XCODE_VERSION code,
2024-04-29, v3.30.0-rc1~183^2) we accidentally stopped capturing the
stderr from `xcodebuild`, causing it to appear in cmake's output.
The error is incidental and tolerated, so do not let the user see it.
2024-07-31 15:43:04 -04:00
Brad King
cdca6814a5 Merge topic 'backport-test-curl-output' into release-3.30
13fb20f4d3 Tests/RunCMake/file-DOWNLOAD: Update bad host name message for curl 8.9

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9690
2024-07-29 11:28:46 -04:00
Brad King
5f38057728 Merge topic 'backport-test-curl-output' into release-3.29
13fb20f4d3 Tests/RunCMake/file-DOWNLOAD: Update bad host name message for curl 8.9

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9690
2024-07-29 11:12:33 -04:00
Brad King
13fb20f4d3 Tests/RunCMake/file-DOWNLOAD: Update bad host name message for curl 8.9 2024-07-29 11:07:05 -04:00
Brad King
74beb6dba8 Xcode: Restore support for CMAKE_OSX_ARCHITECTURES=$(ARCHS_STANDARD)
Skip the `CMAKE_OSX_ARCHITECTURES` validation added by commit db409e5e68
(APPLE: Check if compilers respect CMAKE_OSX_ARCHITECTURES, 2024-05-04,
v3.30.0-rc1~15^2) if the value contains a placeholder, since we do not
know the real value.

Fixes: #26128
2024-07-19 09:42:45 -04:00
Kyle Edwards
b9e2f6828f Merge topic 'TRANSITIVE_LINK_PROPERTIES_isnt_usage' into release-3.30
2fc9e482a9 Evaluation of TRANSITIVE_LINK_PROPERTIES isn't considered a usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9643
2024-07-08 10:04:22 -04:00
Robert Maynard
2fc9e482a9 Evaluation of TRANSITIVE_LINK_PROPERTIES isn't considered a usage
Fixes #26108
2024-07-05 13:16:47 -04:00
Brad King
fe8dc3012e Tests: Fix RunCMake.ExternalProject when git is not available
Move Git-dependent test cases added by commit 2ef3bd9186
(ExternalProject: Add TLS version options for https connections,
2024-02-26, v3.30.0-rc1~471^2) into the block of cases that run only
when Git is found.

Fixes: #26104
2024-07-03 10:44:15 -04:00
Brad King
c3046ea289 Merge topic 'link-feature-attributes-stabilization' into release-3.30
576567f028 Link feature attributes: stabilization
5617c34c31 Libraries processing: update configuration wording

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9607
2024-06-24 09:22:47 -04:00
Brad King
b1a804d616 Ninja Multi-Config: Fix crash if config list is changed in subdirectory
Look up the value of `CMAKE_CONFIGURATION_TYPES` only in the top level
directory.

Fixes: #26064
2024-06-21 12:21:36 -04:00
Marc Chevrier
576567f028 Link feature attributes: stabilization
* enhance OVERRIDE handling
* Update wording
2024-06-21 11:18:20 +02:00
Marc Chevrier
5617c34c31 Libraries processing: update configuration wording 2024-06-21 11:18:12 +02:00
Brad King
b243c19986 Tests: Update expected results for Xcode 16
In `Tests/RunCMake/LinkerSelection`, Xcode 16 warns when building the
AppleClassic case:

    ld: warning: -ld_classic is deprecated and will be removed
                 in a future release

Tolerate all build warnings.
2024-06-13 09:16:34 -04:00
Craig Scott
9299cbbdb4 FetchContent: Force cmake --fresh to re-execute direct population steps
Issue: #25468
2024-06-07 18:12:12 +10:00
Craig Scott
e82e2c38c1 Tests: RunCMake.FetchContent should not always force _deps removal
To properly test some functionality, tests may rely on not clearing
things like time stamps between cmake invocations. The RunCMake
infrastructure clears the build directory by default anyway, and
tests may individually ask for that to be disabled where needed.

The line being removed here was originally added to assist with
manually re-running individual tests locally outside the control of
RunCMake. That is no longer appropriate.
2024-06-07 17:58:55 +10:00
Craig Scott
f97b25ec4b Tests: Fix -direct variants of FetchContent tests using wrong files
The -direct variants of the RunCMake.FetchContent tests were
meant to be using the same result, stdout and stderr files as the
non-direct tests. The -direct tests were specified in the wrong way
for that and ended up using no files at all, so they weren't testing
the full set of expected conditions. Use the test variant feature
provided by the RunCMake infrastructure instead, which is the
proper way to handle this sort of scenario.
2024-06-07 17:58:55 +10:00
Brad King
a67bb7f488 Merge topic 'FindPython-free-threaded-python'
9a0dee7257 FindPython: Add support for free threaded python
4178ab928f FindPython: Fix spelling error

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9578
2024-06-05 09:34:03 -04:00
Brad King
0a219e4058 Merge topic 'FindMatlab-test-versions_checks'
bda14d99f5 Tests: Fix FindMatlab.versions_checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9583
2024-06-05 09:25:56 -04:00
Silvio Traversaro
bda14d99f5 Tests: Fix FindMatlab.versions_checks
`matlab_get_release_name_from_version("14.10" release_name)` does not
write the `release_name` variable if the `14.10` is not a known version,
so before checking for the variable to be empty, we should set it to an
empty value.
2024-06-04 14:02:09 -04:00
Silvio Traversaro
e265065ed6 Tests: Fix FindMatlab.no_implicit_link_checks
`matlab_add_mex` uses the plain signature of `target_link_libraries`,
so we need to use the plain signature also outside of `matlab_add_mex`
to avoid a configuration error.
2024-06-04 14:01:23 -04:00
Marc Chevrier
9a0dee7257 FindPython: Add support for free threaded python
Fixes: #26016
2024-06-04 18:14:35 +02:00
Marc Chevrier
4178ab928f FindPython: Fix spelling error 2024-06-04 16:12:55 +02:00
Brad King
57c6dd277e Merge topic 'cpack-nuget-dependency-groups'
0f4d3664a9 CPack/NuGet: Build dependencies in groups

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9544
2024-06-04 08:59:28 -04:00
Alex Opie
0f4d3664a9 CPack/NuGet: Build dependencies in groups
This allows particular frameworks to be targeted by
particular dependencies, and for empty dependency
groups to satisfy NuGet's framework-matching
requirements.
2024-06-03 11:28:49 -04:00
Brad King
1df18d5e54 Merge topic 'cmake-C-crash'
7330121467 Fix crash in target-specific commands called from initial cache script

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9571
2024-06-03 09:10:52 -04:00
Brad King
d1cf2a2206 Merge topic 'file-accept-empty-lists'
7c516f7e28 file(): TOUCH, TOUCH_NOCREATE and MAKE_DIRECTORY accept empty lists

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9570
2024-06-03 09:08:52 -04:00
Brad King
640a167d03 Merge topic 'ep-disable-source-changes'
0cc1b550dd ExternalProject,FetchContent: Avoid CMAKE_DISABLE_SOURCE_CHANGES error

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9569
2024-06-03 09:07:46 -04:00
Brad King
7330121467 Fix crash in target-specific commands called from initial cache script
Fixes: #26018
2024-06-01 06:28:26 -04:00
Brad King
719b461b9c Merge topic 'ci-msvc-14.40'
0070708ae1 gitlab-ci: Update Windows builds to MSVC 14.40 toolset
41e777274a Tests: Update BuildDepends test for VS 17.10
f26e8886b3 cmake-gui: Suppress MSVC deprecation warnings from Qt headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9560
2024-05-31 09:52:15 -04:00
Brad King
107d6336b3 Merge topic 'cpack-deb-shlibdeps'
27d161eac3 CPackDeb: dpkg-shlibdeps shall consider dependency components, too

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9531
2024-05-31 09:23:36 -04:00
Brad King
e0a11dfa24 Merge topic 'dep-provider-try_compile'
4cb5bb014d try_compile: Propagating top level includes into whole-project calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !9532
2024-05-31 09:20:27 -04:00
Craig Scott
7c516f7e28 file(): TOUCH, TOUCH_NOCREATE and MAKE_DIRECTORY accept empty lists
Projects may be generating a list of files or directories to pass as arguments
to file(TOUCH), file(TOUCH_NOCREATE), or file(MAKE_DIRECTORY). Those
lists might end up being empty, so rather than requiring at least one item,
allow an empty list.

Fixes: #24897
2024-05-31 22:55:20 +10:00
Craig Scott
0cc1b550dd ExternalProject,FetchContent: Avoid CMAKE_DISABLE_SOURCE_CHANGES error
The file(MAKE_DIRECTORY) implementation checks whether a path is
allowed to be written to before it checks if it already exists. For the
scenario where a SOURCE_DIR is an existing directory within the main
project's source directory, this triggers a fatal error if
CMAKE_DISABLE_SOURCE_CHANGES is set to true for ExternalProject,
and some FetchContent scenarios. Therefore, add an explicit check for
existence first to avoid making such error-triggering calls.

Fixes: #21872
2024-05-31 18:01:27 +10:00
Brad King
41e777274a Tests: Update BuildDepends test for VS 17.10
The test project now rebuilds `link_depends_no_shared_exe` in `Debug`
builds.  MSBuild `-v:diag` shows:

    Source compilation required:
    input C:\...\DEBUG\LINK_DEPENDS_NO_SHARED_LIB.PDB is newer
    than output C:\...\DEBUG\LINK_DEPENDS_NO_SHARED_EXE.EXE.

Use the `Release` configuration instead.
2024-05-30 14:23:47 -04:00
Brad King
f26e8886b3 cmake-gui: Suppress MSVC deprecation warnings from Qt headers
MSVC 14.38+ toolsets deprecate `stdext::checked_array_iterator`.
Support building with versions of Qt that have not been updated
to avoid the deprecated API.

Qt-Issue: https://bugreports.qt.io/browse/QTBUG-118993
2024-05-30 14:23:47 -04:00
Deniz Bahadir
27d161eac3 CPackDeb: dpkg-shlibdeps shall consider dependency components, too
When using `dpkg-shlibdeps` to automatically determine package
dependencies it considers the RUNPATH/RPATH of executables in order to
find all required shared libraries of such executables.

If the RUNPATH/RPATH contains a verbatim `$ORIGIN` (respective
`${ORIGIN}`), it will now be substituted by the packaging-paths of other
components that are marked as dependency and those paths will then be
used as additional search directories for `dpkg-shlibdeps`.

Associated tests were added as well.

Fixes: #21838
2024-05-30 16:13:46 +02:00
Brad King
679a3d9e6c Merge topic 'enforce-fc-fully-disconnected-requirements'
f588421b58 FetchContent: Enforce FETCHCONTENT_FULLY_DISCONNECTED requirements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9556
2024-05-30 10:13:29 -04:00
Brad King
c024b5cf9a Merge topic 'CUDAToolkit_search_non_activated_compiler_paths'
eed16fbc00 FindCUDAToolkit: Use CUDA compiler path even when CUDA lang not enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9558
2024-05-30 10:12:39 -04:00
Craig Scott
4cb5bb014d try_compile: Propagating top level includes into whole-project calls
Fixes: #24151
2024-05-30 19:01:03 +10:00
Robert Maynard
eed16fbc00 FindCUDAToolkit: Use CUDA compiler path even when CUDA lang not enabled
Fixes: #25567
2024-05-29 14:39:29 -04:00
Brad King
54c9185b33 Merge topic 'deprecate-fetchcontent_populate'
4370fcf750 FetchContent: Deprecate FetchContent_Populate(depName)
bc70b458ad Help: Minor grammar improvements for FetchContent

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9552
2024-05-29 08:41:57 -04:00
Brad King
a5269e0693 Merge topic 'hip-std'
c299fd8266 Tests/CompileFeatures: Cover hip_std_## meta-features
5d93c421f1 HIP: Populate CMAKE_HIP_KNOWN_FEATURES global property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9555
2024-05-29 08:35:26 -04:00
Brad King
ad90d891f8 Merge topic 'swift-multi-config'
5bb7f8a4dd Swift: Use per-config module file locations in multi-config generators
b2e042d77a cmGeneratorTarget: Adopt Swift-related methods from the Ninja generator
45b3387c50 Tests/RunCMake/Swift: Enable more cases with Ninja Multi-Config

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9501
2024-05-29 08:34:21 -04:00
Craig Scott
f588421b58 FetchContent: Enforce FETCHCONTENT_FULLY_DISCONNECTED requirements
FETCHCONTENT_FULLY_DISCONNECTED should only be set to true if
each dependency's source directory has already been populated.
Previously, this wasn't being checked, but now it is (subject to a new
policy).
2024-05-29 20:39:17 +10:00
Craig Scott
4370fcf750 FetchContent: Deprecate FetchContent_Populate(depName)
Projects should use FetchContent_MakeAvailable(depName)
instead. Policy CMP0169 provides backward compatibility.
2024-05-29 18:52:24 +10:00
Brad King
c299fd8266 Tests/CompileFeatures: Cover hip_std_## meta-features 2024-05-28 14:36:50 -04:00
Brad King
374716a47a Merge topic 'execute_process-child-startup-info'
fa8c04b421 Tests/RunCMake/execute_process: Check STARTUPINFOW reserved members
d98df689ab Merge branch 'libuv-win-process-no-extra-stdio'
a590382850 libuv: win/spawn: disable extra-file-descriptor support not needed by CMake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9541
2024-05-28 08:56:42 -04:00
Craig Scott
2efceb290e FetchContent: Make FetchContent_Populate() honor CMP0168 2024-05-25 19:01:10 +10:00