Commit Graph

13626 Commits

Author SHA1 Message Date
Robert Maynard
4a3cafec4f FindCUDAToolkit: Fix cudart dependencies
Fixes: #25665
2024-02-08 12:57:13 -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
Brad King
ef49ed0fe1 LLVMFlang: Fix MSVC ABI debug information format options
In commit 26bf32cdc6 (LLVMFlang: Add support for targeting MSVC ABI on
Windows, 2023-09-28, v3.28.0-rc1~10^2) we incorrectly recorded `-g` as
supporting the `ProgramDatabase` format, but it is actually `Embedded`,
matching Clang.

In order to support easy integration with C and C++ projects that use
the `.pdb` debug formats, pretend LLVMFlang supports them and just don't
actually emit any debug information.

Issue: #24840
2023-12-04 20:30:46 -05:00
Brad King
bf22ac5263 CPack/RPM: Quote paths in rpm spec only if they have whitespace
RPM supports either whitespace with quoting or globbing without quoting.
Prior to RPM 4.19 it accepted globbing in quotes, but it only globbed
correctly without whitespace, where quoting was not necessary anyway.
Starting in RPM 4.19, glob characters in quotes are considered literal.

Fixes: #25421
Inspired-by: Ben Boeckel <ben.boeckel@kitware.com>
See: d44114f007
2023-11-29 12:47:20 -05:00
Brad King
75ea6207b7 CPack/RPM: Factor out helper to quote paths in generated rpm spec 2023-11-29 12:27:31 -05:00
Ben Boeckel
77a7edb73f Clang-CXX: copy into the dyndep output on success
When `clang-scan-deps` fails to scan (e.g., bad source syntax, junk
flags, etc.), the redirection unconditionally updates the file. If this
fails, the `.ddi` file timestamp is updated. If the state is then
reverted (e.g., the command line returns to the state of the last
successful build), the updated file is not useful, but `ninja` does not
rerun because:

- the command hash matches the last successful run
- the output file is newer than its inputs

However, since the `.ddi` file has been updated with bogus contents from
a failed scan, collation fails as the `rules` array is empty (or
incomplete from a batch scan).

If `clang-scan-deps` were properly aware of its output file, it could
use this to not write the file if any inner scan fails. Requested in
https://github.com/llvm/llvm-project/issues/72875.

See: https://github.com/llvm/llvm-project/issues/72875
Fixes: #25429
2023-11-21 09:41:59 -05:00
Brad King
2744f14db1 codespell: Fix typos 2023-11-17 09:58:21 -05:00
Brad King
339cd47732 Merge topic 'FindOpenMP-5.1-and-5.2' into release-3.28
2859be7575 FindOpenMP: Add support for openmp 5.1 (llvm 17) and 5.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Markus Mützel <markus.muetzel@gmx.de>
Merge-request: !8965
2023-11-14 09:04:53 -05:00
Christoph Reiter
2859be7575 FindOpenMP: Add support for openmp 5.1 (llvm 17) and 5.2
llvm 17 now defaults to openmp 5.1; see LLVM commit `0c6f2f629cc0`.
It makes FindOpenMP set OPENMP_FOUND and OpenMP_C_SPEC_DATE, but not
OpenMP_C_VERSION, because it doesn't know the version mapping.
Add the spec date to the version mapping for 5.1 and 5.2 to make
things work again.
2023-11-13 10:51:40 -05:00
Robert Maynard
b38a8e77cb FindCUDAToolkit: Search for cufile library name being lowercase
Fixes #25398
2023-11-08 10:43:30 -05:00
Brad King
79f3f29e50 CUDA: Parse NVCC implicit compile/link information in Visual Studio generators
Refactoring in commit deff0e638d (CUDA: Factor out helper to parse NVCC
implicit compiler and linker flags, 2023-09-15, v3.28.0-rc1~63^2~6)
incorrectly dropped detection of the default CUDA architecture and
the CUDA toolkit include directories from the code path used for
Visual Studio generators.  However, CMakeNVCCParseImplicitInfo is
now general enough that we no longer need a VS-specific code path.

Fixes: #25378
2023-11-01 13:51:21 -04:00