13635 Commits

Author SHA1 Message Date
Brad King
6df925b595 cxxmodules: Do not scan sources while testing the compiler
The C++ sources we use to test the compiler do not use modules.
Avoid requiring a compiler that can scan just to enable the language,
even when CMP0155 is NEW.  The project may explicitly turn off
`CMAKE_CXX_SCAN_FOR_MODULES` before adding any targets.

Fixes: #25956
2024-05-06 13:59:27 -04:00
Brad King
b6b2f73f36 FindTIFF: Fix name of upstream TIFF cmake package
Since commit 6a3059e66f (FindTIFF: bridge `tiff-config` into
FindTIFF-compatible interface, 2023-09-14, v3.28.0-rc1~87^2)
we try to find the upstream TIFF cmake package.  However, it
is called `TiffConfig.cmake`, not `tiff-config.cmake`, so we
need to match the capitalization of the package name.
2024-02-29 08:47:53 -05:00
Ben Boeckel
7008fc234b CMakeDetermineCompilerId: use _ARG1 to query the clang resource dir
Other core queries do this, so do it here too.
2024-02-26 11:49:17 -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
40be88a92e visionOS: Update deployment-target flag for Xcode 15.1 beta
Use the same flags Xcode adds for `XROS_DEPLOYMENT_TARGET`.  They are
`-target arm64-apple-xros1.0` and `-target arm64-apple-xros1.0-simulator`,
where `1.0` is the deployment target version.

Fixes: #25188
2024-02-09 11:32:13 -05:00
Brad King
1c05251433 Merge topic 'FindCUDAToolkit-cudart-deps' into release-3.28
4a3cafec4f FindCUDAToolkit: Fix cudart dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9236
2024-02-09 09:00:46 -05:00
Robert Maynard
4a3cafec4f FindCUDAToolkit: Fix cudart dependencies
Fixes: #25665
2024-02-08 12:57:13 -05:00
Brad King
f4b5152f47 Merge topic 'findmatlab-registry-lookup-without-versionxml' into release-3.28
e22c4dfea0 FindMatlab: Revert undocumented and now-unnecessary full version lookup

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9226
2024-02-08 09:40:05 -05:00
Hermann von Kleist
e22c4dfea0 FindMatlab: Revert undocumented and now-unnecessary full version lookup
Partially revert commit dc9d9589e4 (FindMatlab:WIN32: return full Matlab
version when found via registry, 2023-09-14, v3.28.0-rc1~82^2~2).  It
changed `matlab_extract_all_installed_versions_from_registry` behavior
to query `VersionInfo.xml` for version information.  However, the
function documentation states that it only uses the registry.  It's also
not needed since commit c608adc236 (FindMatlab: Fix major.minor version
lookups in Windows Registry, 2024-01-11, v3.28.2~13^2~1), which added
the same lookup to `matlab_get_all_valid_matlab_roots_from_registry`.
2024-02-07 12:12:12 -05:00
Martin Storsjö
0d933fc0d9 Ninja: Update showIncludes prefix detection for clang-cl 18
Since commit LLVM/Clang commit `5523fefb01c2` ([clang][lex] Use
preferred path separator in includer-relative lookup, 2023-09-08), part
of the upcoming 18.x release, the output format of the showIncludes flag
has changed, where it now prints paths with double backslashes:

    Note: including file: .\\foo.h

Previously, we expected to see the path name in the form "./foo.h".

Extend the regex to match a path name starting with `.\`, in addition to
the existing matched patterns.
2024-02-07 09:38:14 -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
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
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
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
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
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
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
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
f6f33385d7 Merge topic 'check_language_propagate_hip_platform' into release-3.28
ce9c6d0994 HIP: Propagate CMAKE_HIP_PLATFORM from/to the test project in check_language
9ba3fc91e5 HIP: Really forward CMAKE_HIP_HOST_COMPILER in check_language(HIP)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9121
2024-01-05 10:16:52 -05:00
Brad King
cab0ec1f75 Merge topic 'revert-ExternalProject-download-byproducts' into release-3.28
fd3c9876c6 ExternalProject: revert `BYPRODUCTS` for download outputs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9097
2024-01-04 11:35:10 -05:00
Gergely Meszaros
ce9c6d0994 HIP: Propagate CMAKE_HIP_PLATFORM from/to the test project in check_language
Fixes: #25541
2024-01-04 11:25:15 -05:00
Gergely Meszaros
9ba3fc91e5 HIP: Really forward CMAKE_HIP_HOST_COMPILER in check_language(HIP)
In commit b3e92775ab (HIP: Add CMAKE_HIP_HOST_COMPILER when compiler is
NVCC, 2023-09-25, v3.28.0-rc1~44^2~2) we accidentally left this out.
2024-01-03 18:15:21 -05:00
Ben Boeckel
fd3c9876c6 ExternalProject: revert BYPRODUCTS for download outputs
Xcode has been reported to not work at all with this when
ExternalProject projects share download files.

Revert commit 872daff159 (ExternalProject: declare byproducts for the
download step, 2023-09-21, v3.28.0-rc1~27^2) pending further
investigation.

Fixes: #25525
2024-01-03 14:18:35 -05:00
Ben Boeckel
5a7927d028 Help: update lua.org links to be HTTPS
This is now a permanent redirect, so update links accordingly.
2024-01-01 11:32:32 +11:00
Jason E. Hale
61436858e4 UsePkgConfig: Restore removal of trailing whitespace from pkg-config output
Since commit f73a5bfaa9 (UsePkgConfig: Replace exec_program() with
execute_process(), 2023-07-24, v3.28.0-rc1~321^2~6), trailing whitespace
was introduced into libraries linked, which violates CMP0004.
2023-12-19 15:35:24 -05:00
Brad King
e42eaa4342 Merge topic 'FindCUDAToolkit-cupti' into release-3.28
04959e0285 Tests: Verify CUDA::cupti existence on a subset of machines
09a3c8b46b CUDAToolkit: Correctly search all include paths from compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9072
2023-12-15 09:31:59 -05:00
Robert Maynard
09a3c8b46b CUDAToolkit: Correctly search all include paths from compiler
The CUDAToolkit usage of `find_path( PATHS )` was incorrectly
quoting a list of paths causing none of them to be used.
2023-12-14 14:04:53 -05:00
Brad King
9dc0392df0 FindBoost: Add support for Boost 1.84
Update the list of known versions.

Run the command

    cmake -DBOOST_DIR=/path/to/boost_1_84_0 \
      -P Utilities/Scripts/BoostScanDeps.cmake

to extract dependencies from the 1.84.0 source tree.
They are the same as 1.83's dependencies, so just update
the version check for warning about newer versions.

Fixes: #25499
2023-12-14 11:35:26 -05:00
Brad King
a76bb5f865 Merge topic 'FindMatlab-version' into release-3.28
0f6e9d0658 FindMatlab: Fix processing of multiple versions from Windows Registry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9074
2023-12-14 10:46:29 -05:00
Brad King
0f6e9d0658 FindMatlab: Fix processing of multiple versions from Windows Registry
Fix logic from commit fff5c1507e (FindMatlab: refactor: use registry
query instead of execute_process, 2023-09-14, v3.28.0-rc1~82^2~7)
to work when multiple versions are found in the registry.

Issue: #25497
2023-12-14 10:35:56 -05:00
Brad King
84930e9a4c FindTIFF: Restore support for projects that do not enable CMP0057
Since commit 6a3059e66f (FindTIFF: bridge `tiff-config` into
FindTIFF-compatible interface, 2023-09-14, v3.28.0-rc1~87^2) we use the
`if(IN_LIST)` test that required CMP0057.  Expand the scope over which
we enable that policy explicitly.

Issue: #25485
2023-12-14 09:43:08 -05:00
Brad King
828df1d9e4 FindFreetype: Fix success message when config module is found
Follow up commit d892dedf22 (FindFreetype: always find the config module
quietly, 2023-12-13) with a fix to the FPHSA call that reports success.

Fixes: #25485
2023-12-14 09:06:07 -05:00
Brad King
3d1fbc4f6b Merge topic 'FindMatlab-version' into release-3.28
ef64c118de FindMatlab: Fix regression on Windows Registry lookup failure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9070
2023-12-14 08:30:00 -05:00
Brad King
ef64c118de FindMatlab: Fix regression on Windows Registry lookup failure
Fix logic from commit dc9d9589e4 (FindMatlab:WIN32: return full Matlab
version when found via registry, 2023-09-14, v3.28.0-rc1~82^2~2) to
avoid assuming that a registry entry always exists and is non-empty.

Fixes: #25497
2023-12-14 08:12:13 -05:00
Ben Boeckel
581acbce52 FindTIFF: consider IMPLIB-using platforms
Support multi-config-providing and `IMPLIB`-using deployments with the
`tiff-config` trampoline code. Follow the pattern used in `FindFreetype`
by commit ae9890cd36 (FindFreeType: consider `IMPLIB`-using platforms,
2023-10-26, v3.28.0-rc4~10^2~3).

See: #25485
2023-12-13 13:12:45 -05:00
Ben Boeckel
e8e7d9f775 FindTIFF: always find the config module quietly
When the config module is not present, a spurious "tiff not found" is
output before the pre-existing logic is used. Instead, silence the
module and use FPHSA to report as-if `TIFF` did the search.

Fixes: #25485
2023-12-13 13:12:45 -05:00
Ben Boeckel
a575bebf0d FindFreetype: also consider RelWithDebInfo-built libraries 2023-12-13 13:12:45 -05:00
Ben Boeckel
d892dedf22 FindFreetype: always find the config module quietly
When the config module is not present, a spurious "freetype not found"
is output before the pre-existing logic is used. Instead, silence the
module and use FPHSA to report as-if `Freetype` did the search.

See: #25485
2023-12-13 11:28:18 -05:00
Brad King
7cbf1f7a58 Merge topic 'bug/fix_cupti_regression' into release-3.28
f69b9b7305 CUDAToolkit: Restore ability to find cupti headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Misha Chornyi <mchornyi@nvidia.com>
Merge-request: !9054
2023-12-12 08:36:26 -05:00
Robert Maynard
f69b9b7305 CUDAToolkit: Restore ability to find cupti headers
Fixes #25484

PR !8835 failed to update the CUPTI header searches to use the
new internal FindCUDAToolkit search variables. This caused the
CUDA::cupti target to always not exist.
2023-12-08 11:46:54 -05:00
Brad King
2d60f5c7a6 Merge topic 'FindCUDAToolkit-fix-stubs' into release-3.28
d85bf99bcb FindCUDAToolkit: Fix stub library representation on reconfigure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !9045
2023-12-07 10:57:20 -05:00
Craig Scott
bd50e8a058 Help: Fix malformed cross-reference in FetchContent docs 2023-12-07 17:04:25 +11:00
Brad King
d85bf99bcb FindCUDAToolkit: Fix stub library representation on reconfigure
Since commit 0744c02e24 (FindCUDAToolkit: targets pointing to stubs now
use IMPORTED_IMPLIB, 2023-07-24, v3.28.0-rc1~309^2) we recognize CUDA
stub libraries and represent them in a special way.  However, the logic
only works on the first configuration of a build tree when the libraries
are first found.  Once the results are cached, we incorrectly revert to
the non-stub representation.

Fix this by recognizing stub libraries based on their path instead.
2023-12-06 16:10:24 -05:00