Commit Graph

65152 Commits

Author SHA1 Message Date
Brad King edfdec287c Merge topic 'cxxmodules-transitive-modules-usage' into release-3.28
ec348ee4b9 cmGeneratorTarget: discover synthetic targets recursively
67466ddf65 cmExportFileGenerator: export link libraries as-is
a2e3e61a31 Tests/CXXModules: test transitive modules usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9273
2024-02-21 13:28:52 -05:00
Brad King 01e33df83f Help: Modernize BUILD_SHARED_LIBS documentation
Previously the documentation used long-outdated terminology from
CMake's early days.

Issue: #25699
2024-02-21 09:25:49 -05:00
Ben Boeckel a3ada1a241 Clang: detect -resource-dir for clang-scan-deps
When cross-compiling, `clang-scan-deps` needs help to find the correct
location of core headers such as `stddef.h`. Always determine this path
and pass it when available.

Fixes: #25590
2024-02-21 08:51:42 -05:00
Brad King 6b8c99a1e3 Tests: Fix BuildDepends on macOS arm64 without rosetta 2024-02-21 08:39:37 -05:00
Kitware Robot f5b0fe1899 CMake Nightly Date Stamp 2024-02-21 00:01:17 -05:00
Ben Boeckel f0df692d21 Tests/CXXModules: test cxx_std_20 coming from a dependency
Closes: #25569
2024-02-20 12:32:48 -05:00
Hermann von Kleist ae558b9ad0 FindMatlab: Support REGISTRY_VIEW
CMake 3.24 added REGISTRY_VIEW as find_package argument. Since
FindMatlab.cmake looks up the registry, we might as well support it.

While some logic existed to select the correct registry view when
searching for the installed versions, that logic was not applied when
getting the matlab root directories, which might have led to weird
situations in which both the 32-bit and 64-bit version of the same
Matlab release were installed simultaneously.

The changes made in this commit try not to break existing and documented
behavior from exposed functions. The exposed functions which interact
with the registry get an optional `REGISTRY_VIEW` argument.

If no REGISTRY_VIEW is passed to find_package, FindMatlab uses the
`TARGET` view to mimic the previous behavior.
2024-02-20 18:07:47 +01:00
Ben Boeckel ec348ee4b9 cmGeneratorTarget: discover synthetic targets recursively
Fixes: #25288
2024-02-20 10:53:31 -05:00
Ben Boeckel 67466ddf65 cmExportFileGenerator: export link libraries as-is
This allows for transitive modules to work because
`$<COMPILE_ONLY>`-wrapped dependencies do not end up in the
`linked-target-dirs` collator property. Test suite exported property
tests updated to account for the change.
2024-02-20 10:53:31 -05:00
Ben Boeckel a2e3e61a31 Tests/CXXModules: test transitive modules usage 2024-02-20 10:53:31 -05:00
Brad King 82a174182a cmVisualStudioGeneratorOptions: Add UsingDebugRuntime method 2024-02-20 10:48:31 -05:00
Brad King f498032141 cmVisualStudioGeneratorOptions: Rename {IsDebug => UsingDebugInfo}
The latter name is more precise.
2024-02-20 10:48:31 -05:00
Brad King 3a171009e9 Merge topic 'vs-UseDebugLibraries'
b814641444 VS: Add [CMAKE_]VS_USE_DEBUG_LIBRARIES options to control UseDebugLibraries
67de5b7b82 VS: Suppress MSBuild default settings affected by UseDebugLibraries
0ae372daee VS: Factor out common MS tool configuration

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9270
2024-02-20 10:37:32 -05:00
Brad King 3710358c7e Merge branch 'release-3.29' 2024-02-20 10:36:01 -05:00
Brad King 9e8731b2ff Merge topic 'vs-17.10'
d256581bb0 VS: Fix '-T version=14.40' under VS 17.10 preview 1
3a7fbd04c8 VS: Verify toolset version= field format more strictly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9271
2024-02-20 10:36:01 -05:00
Brad King d2df2e94e5 Merge topic 'vs-17.10' into release-3.29
d256581bb0 VS: Fix '-T version=14.40' under VS 17.10 preview 1
3a7fbd04c8 VS: Verify toolset version= field format more strictly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9271
2024-02-20 10:36:00 -05:00
Brad King 9dbe40709d Merge topic 'find-matlab-version-range-changelog'
3b51a52af0 FindMatlab: Add changelog for now supported version range

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9268
2024-02-20 10:34:18 -05:00
Brad King f9d972303b Merge branch 'release-3.29' 2024-02-20 10:32:54 -05:00
Brad King f1db230068 Merge branch 'release-3.28' 2024-02-20 10:32:52 -05:00
Brad King aad37338c7 Merge branch 'release-3.28' into release-3.29 2024-02-20 10:32:42 -05:00
Brad King 2b0147cd72 Merge branch 'release-3.29' 2024-02-20 10:30:26 -05:00
Brad King 5bc5a485fa Merge topic 'cxxmodules-transitive-target-usage'
8b6fc81fc3 cmTarget: copy link libraries from the right properties
d4a517f82a Tests/CXXModules: add a test with transitive targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9265
2024-02-20 10:30:26 -05:00
Brad King dcdbdd82d5 Merge topic 'cxxmodules-transitive-target-usage' into release-3.29
8b6fc81fc3 cmTarget: copy link libraries from the right properties
d4a517f82a Tests/CXXModules: add a test with transitive targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9265
2024-02-20 10:30:25 -05:00
Brad King 583641ac92 Merge topic 'cxxmodules-transitive-target-usage' into release-3.28
8b6fc81fc3 cmTarget: copy link libraries from the right properties
d4a517f82a Tests/CXXModules: add a test with transitive targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9265
2024-02-20 10:29:18 -05:00
Brad King f51d809b44 ci: Place temporary files inside job directory on Windows 2024-02-20 06:36:22 -05:00
Brad King d256581bb0 VS: Fix '-T version=14.40' under VS 17.10 preview 1
VS 17.10 preview 1 comes with toolset `v143` version `14.40`.  This is
the first time that the first three digits of the version do not match
the toolset name.  Add a special case to map version `14.40` back to
toolset `v143`.
2024-02-20 06:23:34 -05:00
Kitware Robot 821a43b1d4 CMake Nightly Date Stamp 2024-02-20 00:01:14 -05:00
Brad King 3a7fbd04c8 VS: Verify toolset version= field format more strictly
In commit 5f13168419 (VS: Add option to select the version of the
toolset used by VS 2017, 2018-05-19, v3.12.0-rc1~38^2) we added logic to
verify that the toolset version, such as `14.35`, matches the toolset
name, such as `v143`.  Clarify the logic to not construct a temporary
nonsensical toolset name like `v1435`.  Also verify the format of the
toolset version more strictly, e.g., to reject `14.350` earlier.
Previously the latter example was only rejected by the `.props` file not
existing.
2024-02-19 12:06:48 -05:00
Brad King b814641444 VS: Add [CMAKE_]VS_USE_DEBUG_LIBRARIES options to control UseDebugLibraries
This indicates to MSBuild which configurations are considered debug
configurations.  This is useful for reference both by humans and tools.

Issue: #25327
2024-02-19 10:40:41 -05:00
Brad King 67de5b7b82 VS: Suppress MSBuild default settings affected by UseDebugLibraries
`Microsoft.Cl.Common.props` changes some default settings based on
`UseDebugLibraries`.  CMake models its own controls for these settings,
so if the project does not set them, explicitly suppress them to avoid
letting `UseDebugLibraries` affect them.
2024-02-19 10:40:40 -05:00
Brad King 0ae372daee VS: Factor out common MS tool configuration
De-duplicate code writing `PlatformToolset`.
2024-02-19 10:40:40 -05:00
Hermann von Kleist 3b51a52af0 FindMatlab: Add changelog for now supported version range 2024-02-19 16:34:35 +01:00
Ben Boeckel 8b6fc81fc3 cmTarget: copy link libraries from the right properties
This fixes transitive dependencies' usage requirements not appearing
when compiling synthetic targets.

See: https://discourse.cmake.org/t/9819
2024-02-19 10:25:29 -05:00
Ben Boeckel d4a517f82a Tests/CXXModules: add a test with transitive targets 2024-02-19 10:25:27 -05:00
Brad King 14b0ebd4ca Merge topic 'presets-macro-expander'
741a207717 presets: Refactor macro expander implementation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9252
2024-02-19 09:28:27 -05:00
Brad King 09a92bebe9 Merge branch 'release-3.29' 2024-02-19 09:25:04 -05:00
Brad King 844cd3f6eb Merge branch 'release-3.28' 2024-02-19 09:25:02 -05:00
Brad King df4d6c7143 Merge branch 'release-3.28' into release-3.29 2024-02-19 09:24:49 -05:00
Brad King 00d908a01f Merge topic 'cxxmodules-nmc-duplicate-synthetic-targets' into release-3.28
5261af9424 cmGeneratorTarget: store synthetic targets in its cache
e0633a9517 Tests/CXXModules: add a test importing from a `Ninja` install
150d7dbd68 Tests/CXXModules: support building a project with `Ninja`
e48e5e5506 Tests/CXXModules: document `CMake_TEST_MODULE_COMPILATION` items

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9263
2024-02-19 09:23:58 -05:00
Brad King 2e5e7c465d Merge branch 'release-3.29' 2024-02-19 09:23:22 -05:00
Brad King a621340e03 Merge topic 'cxxmodules-nmc-duplicate-synthetic-targets'
5261af9424 cmGeneratorTarget: store synthetic targets in its cache
e0633a9517 Tests/CXXModules: add a test importing from a `Ninja` install
150d7dbd68 Tests/CXXModules: support building a project with `Ninja`
e48e5e5506 Tests/CXXModules: document `CMake_TEST_MODULE_COMPILATION` items

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9263
2024-02-19 09:23:22 -05:00
Brad King f18ba02d7e Merge topic 'cxxmodules-nmc-duplicate-synthetic-targets' into release-3.29
5261af9424 cmGeneratorTarget: store synthetic targets in its cache
e0633a9517 Tests/CXXModules: add a test importing from a `Ninja` install
150d7dbd68 Tests/CXXModules: support building a project with `Ninja`
e48e5e5506 Tests/CXXModules: document `CMake_TEST_MODULE_COMPILATION` items

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9263
2024-02-19 09:23:21 -05:00
Brad King cd0452f13a Merge branch 'release-3.29' 2024-02-19 09:20:35 -05:00
Brad King 44d7393177 Merge topic 'ci-wix-3.14'
adb6af6959 ci: host WiX 3.14.0.8606 binaries ourselves
4c32b3690d ci: update to WiX 3.14.0.8606 release

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9264
2024-02-19 09:20:35 -05:00
Brad King c5c26719c3 Merge topic 'ci-wix-3.14' into release-3.29
adb6af6959 ci: host WiX 3.14.0.8606 binaries ourselves
4c32b3690d ci: update to WiX 3.14.0.8606 release

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9264
2024-02-19 09:20:34 -05:00
Kitware Robot be67b4baf2 CMake Nightly Date Stamp 2024-02-19 00:02:02 -05:00
Kitware Robot e75afeae5c CMake Nightly Date Stamp 2024-02-18 00:01:11 -05:00
Kitware Robot eb7b504471 CMake Nightly Date Stamp 2024-02-17 00:01:20 -05:00
Brad King adb6af6959 ci: host WiX 3.14.0.8606 binaries ourselves
Follow the approach from commit 9ff7fffbf4 (ci: host WiX 3.14.0.6526
binaries ourselves, 2022-08-02, v3.24.0~6^2) for the updated version.
Since we use WiX to package our official release binaries, avoid relying
on an externally-hosted package by hosting it at `cmake.org`.
2024-02-16 13:08:23 -05:00
Ben Boeckel 5261af9424 cmGeneratorTarget: store synthetic targets in its cache
The synthetic target cache was never actually updated, so record them in
the cache so that reuses can actually be discovered.

Fixes: #25568
2024-02-16 11:09:56 -05:00