63804 Commits

Author SHA1 Message Date
Brad King
5e984bb352 CMake 3.28.3 v3.28.3 2024-02-05 10:28:25 -05:00
Brad King
292d808a3a Merge topic 'restore-pch-with-unity' into release-3.28
30829da506 Unity: Clarify source comments on unity build transformation
87bf1c6c33 Merge branch 'unity-after-compile-features' into restore-pch-with-unity
df08c37a42 cmGlobalGenerator: Add unity/pch sources after computing compile features
004c3c3986 Tests: Add case covering PCH in a unity build

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9215
2024-02-05 09:57:17 -05:00
Brad King
30829da506 Unity: Clarify source comments on unity build transformation 2024-02-02 09:43:27 -05:00
Brad King
87bf1c6c33 Merge branch 'unity-after-compile-features' into restore-pch-with-unity
Replace commit 76b5383123 (cmGlobalGenerator: add unity sources after
computing target compile features, 2024-01-01, v3.28.2~17^2~1) with an
alternative change.  This merge commit resolves conflicts such that
future `git blame` calls will follow the second parent for the relevant
lines and pretend the replaced commit never existed.

Fixes: #25650
2024-02-02 09:43:15 -05:00
Brad King
df08c37a42 cmGlobalGenerator: Add unity/pch sources after computing compile features
Sources that will be scanned for C++ module dependencies need to be
excluded from unity builds.  We need to compute compile features in
order to know which sources will be scanned.  Unity build and PCH
sources can be added afterward without changing the compile features.

This re-implements commit 76b5383123 (cmGlobalGenerator: add unity
sources after computing target compile features, 2024-01-01,
v3.28.2~17^2~1) using a simpler approach that also preserves support for
PCH with Unity builds.

Issue: #25650
Co-authored-by: Ben Boeckel <ben.boeckel@kitware.com>
2024-02-02 09:39:13 -05:00
Brad King
004c3c3986 Tests: Add case covering PCH in a unity build
Issue: #25650
2024-02-02 08:14:21 -05:00
Brad King
817e309af5 Merge topic 'update-zlib' into release-3.28
22a52526e2 Merge branch 'upstream-zlib' into update-zlib
6c2bed54f6 zlib 2022-10-12 (04f42cec)
e868b19ed1 zlib: Fix 1.2.13 version and date notice

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9204
2024-01-31 09:00:01 -05:00
Brad King
22a52526e2 Merge branch 'upstream-zlib' into update-zlib
# By zlib upstream
* upstream-zlib:
  zlib 2022-10-12 (04f42cec)
2024-01-30 10:15:31 -05:00
zlib upstream
6c2bed54f6 zlib 2022-10-12 (04f42cec)
Code extracted from:

    https://github.com/madler/zlib.git

at commit 04f42ceca40f73e2978b50e93806c2a18c1281fc (v1.2.13).
2024-01-30 10:15:30 -05:00
Brad King
e868b19ed1 zlib: Fix 1.2.13 version and date notice
Issue: #25576
2024-01-30 10:14:46 -05:00
Brad King
1f25aa1a0a CMake 3.28.2 v3.28.2 2024-01-29 15:01:32 -05:00
Brad King
a8b6d36a2d Merge topic 'autogen-makefile-depfile' into release-3.28
d0bedb2170 Autogen: Forward dependencies when both Makefile and DEPFILE are used
4deb9c41b8 cmQtAutoGenInitializer: Improve Const-correctness

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9190
2024-01-29 10:43:43 -05:00
Orkun Tokdemir
d0bedb2170 Autogen: Forward dependencies when both Makefile and DEPFILE are used
Since commit ebc9e448b3 (Autogen: Add depfile support for Makefiles,
2023-09-07, v3.28.0-rc1~101^2~1) CMake does not generate the correct
dependency graph when both `Makefile` and `DEPFILE` are used.
The build of `<target_name>_autogen_timestamp_deps` fails due to
missing dependencies.  To tackle that problem, forward target
dependencies to both `<target_name>_autogen_timestamp_deps` and
`<target_name>_autogen` instead of just `<target_name>_autogen`.

Fixes: #25600
2024-01-28 09:40:47 -05:00
Brad King
6c3ab39109 Merge topic 'revert-FindFreetype-use-config' into release-3.28
b5725ae619 FindFreetype: Revert use of upstream freetype cmake package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9187
2024-01-26 10:12:11 -05:00
Brad King
f6c9da9154 Merge topic 'find-matlab-docs-mcr-version-mapping' into release-3.28
29fece7ef3 FindMatlab: Document that version mappings do not apply to MCR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9184
2024-01-26 10:11:08 -05:00
Brad King
0e39f3446e Merge topic 'find-matlab-fix-nonzero-patch-version' into release-3.28
b1e27b1b9d FindMatlab: Some versions use major.minor.patch in the registry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9183
2024-01-26 10:10:01 -05:00
Orkun Tokdemir
4deb9c41b8 cmQtAutoGenInitializer: Improve Const-correctness 2024-01-26 09:50:35 -05:00
Brad King
0bce22e71e Merge topic 'tests-c99' into release-3.28
a10d2ad397 Tests: Improve C compatibility of LoadCommand tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9186
2024-01-25 14:59:26 -05:00
Brad King
b5725ae619 FindFreetype: Revert use of upstream freetype cmake package
The upstream freetype cmake package uses generator expressions and
imported target to express its dependencies.  That's fine on its own.
However, our use of it since commit d83d925045 (FindFreetype: use
`freetype-config.cmake` if available, 2023-09-06, v3.28.0-rc1~130^2)
causes the `FREETYPE_LIBRARIES` result variable to reference those
imported targets and create a package-level dependency for clients that
did not exist previously.  Revert that change for now, along with its
follow-up fixes.  Further investigation will be needed to solve the
motivating use case another way.

Fixes: #25635
2024-01-25 14:45:49 -05:00
Florian Weimer
a10d2ad397 Tests: Improve C compatibility of LoadCommand tests
The previous code used `char **` and `const char **`` types as if they
were the same.  But they are distinct types in C, so when passing
these pointers as function arguments, their types have to match.
Future C compilers will treat this as an error, similar to what
C++ compilers do today.
2024-01-25 14:35:01 -05:00
Brad King
151601c2e3 Merge topic 'revert-replace-cmsysprocess-with-cmuvprocesschain' into release-3.28
bcbb212df7 Revert use of libuv for process execution for 3.28

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9176
2024-01-25 10:53:04 -05:00
Brad King
23747f7056 Merge topic 'cmuvprocesschain' into release-3.28
adb3e13d32 cmUVProcessChain: Tolerate fileno() of invalid FILE stream
b6e4e4babc cmUVProcessChain: Simplify SetExternalStream usage
116bb2b70f cmUVProcessChain: Simplify builder initialization
d32c30906a Tests: Add missing include in testUVProcessChainHelper on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9181
2024-01-25 10:40:00 -05:00
Hermann von Kleist
29fece7ef3 FindMatlab: Document that version mappings do not apply to MCR 2024-01-25 09:00:18 +01:00
Hermann von Kleist
b1e27b1b9d FindMatlab: Some versions use major.minor.patch in the registry
Fixes #25631.
2024-01-25 08:54:01 +01:00
Brad King
bcbb212df7 Revert use of libuv for process execution for 3.28
Wide use of CMake 3.28.{1,0[-rcN]} has uncovered some hangs and crashes
in libuv SIGCHLD handling on some platforms, particularly in virtualization
environments on macOS hosts.  Although the bug does not seem to be in CMake,
we can restore stability in the CMake 3.28 release series for users of such
platforms by reverting our new uses of libuv for process execution.

Revert implementation changes merged by commit 4771544386 (Merge topic
'replace-cmsysprocess-with-cmuvprocesschain', 2023-09-06, v3.28.0-rc1~138),
but keep test suite updates.

Issue: #25414, #25500, #25562, #25589
2024-01-24 17:10:00 -05:00
Brad King
adb3e13d32 cmUVProcessChain: Tolerate fileno() of invalid FILE stream
On Windows, in a GUI process without a console, the `std{in,out,err}`
standard FILE streams may not be open.  Avoid passing an invalid file
descriptor to the child process, and let libuv attach NUL instead.

Fixes: #25625
2024-01-24 16:59:49 -05:00
Brad King
b6e4e4babc cmUVProcessChain: Simplify SetExternalStream usage
It is commonly called with the `fileno()` of a `FILE*` stream,
so accept the latter directly.
2024-01-24 16:59:49 -05:00
Brad King
116bb2b70f cmUVProcessChain: Simplify builder initialization 2024-01-24 16:59:49 -05:00
Brad King
d32c30906a Tests: Add missing include in testUVProcessChainHelper on Windows
We use `STATUS_ACCESS_VIOLATION` from `windows.h`.
2024-01-24 16:59:23 -05:00
Brad King
30c067e24a Merge topic 'FindMatlab-docs' into release-3.28
b8665d44ba FindMatlab: Fix error message from function
44d2cf3ed4 FindMatlab: Document all registry paths for version lookup
363a7d4693 FindMatlab: matlab_get_release_name_from_version is a function now

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9175
2024-01-23 14:57:07 -05:00
Hermann von Kleist
b8665d44ba FindMatlab: Fix error message from function 2024-01-22 09:29:57 -05:00
Hermann von Kleist
44d2cf3ed4 FindMatlab: Document all registry paths for version lookup 2024-01-22 09:29:09 -05:00
Hermann von Kleist
363a7d4693 FindMatlab: matlab_get_release_name_from_version is a function now 2024-01-22 09:28:04 -05:00
Brad King
663bc936e8 Merge topic 'cuda-clang' into release-3.28
6251edc5a4 CUDA/Clang: Record architectures supported by Clang 16
07b7d0ceaa CUDA/Clang: Update architectures supported by CUDA 12

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !9164
2024-01-19 10:56:07 -05:00
Brad King
10021726ad Merge topic 'cxxmodules-export-file-collisions' into release-3.28
d791f3a180 cxxmodules: make export trampoline script files unique
2352dcc830 Source: Simplify hasher object construction

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9166
2024-01-19 10:54:19 -05:00
Ben Boeckel
d791f3a180 cxxmodules: make export trampoline script files unique
Include the name of the `EXPORT` in the filename when generating export
information for C++ modules. This allows the same directory to be used
for multiple sets of C++ module-using targets.

For `export(TARGETS)` uses, generate a name based on the hash of the
concatenation of the target names involved with the `export()` call.

Fixes: #25609
2024-01-18 17:40:44 -05:00
Brad King
2352dcc830 Source: Simplify hasher object construction 2024-01-18 17:40:32 -05:00
Brad King
6251edc5a4 CUDA/Clang: Record architectures supported by Clang 16 2024-01-18 12:28:14 -05:00
Brad King
07b7d0ceaa CUDA/Clang: Update architectures supported by CUDA 12
In commit 4d90f65b24 (CUDA: Update set of architectures supported by
CUDA 12, 2022-12-19, v3.26.0-rc1~120^2) we incorrectly guarded dropping
removed architectures by compiler id, but it is actually the CUDA 12
toolkit itself that removed support.
2024-01-18 12:27:53 -05:00
Brad King
c0734d5507 Merge topic 'FindMatlab-fix-exact-version' into release-3.28
7060e2135c FindMatlab: Restore support for finding EXACT major.minor version
88a1392270 FindMatlab: use correct registry view when extracting versions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9163
2024-01-18 08:53:10 -05:00
Hermann von Kleist
7060e2135c FindMatlab: Restore support for finding EXACT major.minor version
By comparing major.minor, the behavior approximately matches pre-3.28
behavior.

Fixes: #25605
2024-01-17 10:33:48 -05:00
Hermann von Kleist
88a1392270 FindMatlab: use correct registry view when extracting versions 2024-01-17 16:19:22 +01:00
Brad King
1e32d3118c Merge topic 'cxxmodules-obj-lib' into release-3.28
c09f8d27cd cxxmodules: compute link information for C++ module-consuming targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9154
2024-01-17 09:36:43 -05:00
Brad King
3c868a3fb4 Merge topic 'matlab-win' into release-3.28
42fbe01eba FindMatlab: Accept long version in matlab_get_release_name_from_version
c608adc236 FindMatlab: Fix major.minor version lookups in Windows Registry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9148
2024-01-17 09:34:58 -05:00
scivision
42fbe01eba FindMatlab: Accept long version in matlab_get_release_name_from_version
Make this work:

  matlab_get_release_name_from_version(${Matlab_VERSION})

which the user would expect.

While at it, simplify this function code.
2024-01-16 11:37:43 -05:00
scivision
c608adc236 FindMatlab: Fix major.minor version lookups in Windows Registry
The registry key names use only the first two version components.
Previously we were using the full versions.

Fixes: #25582
2024-01-16 11:35:32 -05:00
Brad King
cce2120428 Merge topic 'FindMatlab-fix-version-without-versioninfoxml' into release-3.28
694727bb45 FindMatlab: Restore support for versions without VersionInfo.xml

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9151
2024-01-16 11:10:28 -05:00
Matheus Izvekov
c09f8d27cd cxxmodules: compute link information for C++ module-consuming targets
Compute link information for all C++ targets which support
modules instead of just those which may provide modules, as
they may import modules as well. This captures `OBJECT` libraries using modules
which otherwise do not have link steps.

Fixes: #25592
2024-01-14 14:14:26 -03:00
Hermann von Kleist
694727bb45 FindMatlab: Restore support for versions without VersionInfo.xml
Report "unknown" in `_Matlab_VersionInfoXML` if file is missing.
Fix omitted MATLAB root with unknown version from XML.

Fixes: #25585
Fixes: #25586
2024-01-12 09:38:12 -05:00
Brad King
01e3eb91b8 Merge topic 'update-zlib' into release-3.28
941b948a85 Merge branch 'upstream-zlib' into update-zlib
5d030dc716 zlib 2022-10-12 (04f42cec)
b7379f9e21 zlib: Update script to get zlib 1.2.13

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !9145
2024-01-11 09:59:52 -05:00