Commit Graph

13506 Commits

Author SHA1 Message Date
Brad King
b3a1f17567 CUDA: Factor out helper to validate CMAKE_CUDA_ARCHITECTURES
Prepare to use it for other languages.
2023-09-21 15:34:28 -04:00
Brad King
8617c28221 CUDA: Factor out helper for detecting native CUDA architectures
Prepare to use it for other languages.
2023-09-21 15:34:28 -04:00
Brad King
0db0fe7958 CUDA: Factor out helper to compute all CUDA architectures
Prepare to use it for other languages.
2023-09-21 15:34:28 -04:00
Brad King
c16f1e2b93 CUDA: Factor out helper to find CUDA Toolkit for compiler
Prepare to use it for other languages.
2023-09-21 15:34:28 -04:00
Brad King
a6841a967b CUDA: Factor out helper to filter implicit link libraries
Prepare to use it for other languages.
2023-09-21 15:34:27 -04:00
Brad King
deff0e638d CUDA: Factor out helper to parse NVCC implicit compiler and linker flags
Prepare to use it for other languages.
2023-09-21 15:34:27 -04:00
Brad King
e1b2a5062f CUDA: Factor out some NVCC compiler information
Prepare to use nvcc for other languages.
2023-09-21 15:34:27 -04:00
Brad King
f125dfcd30 CUDA: Clarify order of logic finding CUDA Toolkit for compiler
Finish all the search logic before using any results.
2023-09-21 15:34:27 -04:00
Brad King
d08b7f3cda CUDA: Clarify compiler-specific logic in architectures table 2023-09-21 15:34:27 -04:00
Brad King
7b2aec0fef CUDA: Clarify logic detecting compiler default CUDA architectures
Improve variable names and comments.

Remove a comment missed by commit c267ed205a (CUDA: Defer architecture
testing to the compiler testing step, 2022-04-25, v3.24.0-rc1~222^2)
about architecture verification.
2023-09-21 15:34:27 -04:00
Brad King
69a5ef7cc0 CUDA: Simplify isolation of work variables for determining compiler
Unset variables as soon as we are done with them.
Rename one work variable to a private name.
2023-09-21 15:34:27 -04:00
Brad King
8a966debe3 CUDA: Combine consecutive blocks using same condition for determining compiler 2023-09-21 15:34:26 -04:00
Brad King
72efbeadae CUDA: Simplify CMAKE_GENERATOR references for determining compiler 2023-09-21 15:34:23 -04:00
Brad King
3d3c49cd9c Merge topic 'update-module-document'
3a54ee8cd5 FindQuickTime: Improve documentation formatting
3cf5f4af54 FindProducer: Improve documentation formatting
b35c17b202 FindPhysFS: Improve documentation formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8812
2023-09-19 09:09:44 -04:00
scivision
39881de3f6 FindMatlab:macOS: return full version when found by path guess 2023-09-18 15:50:48 -04:00
scivision
35bcb9116c FindMatlab:lint: set(... CACHE INTERNAL) implies FORCE 2023-09-18 15:23:21 -04:00
scivision
dc9d9589e4 FindMatlab:WIN32: return full Matlab version when found via registry
rework internal XML reading function for better code reuse and
namespace isolation
2023-09-18 15:23:21 -04:00
scivision
abbfdd3b3a FindMatlab: improve version regex
the matlab_versions_mapping always has at least major.minor
2023-09-18 15:23:21 -04:00
scivision
ff20d993f3 FindMatlab: doc: rename osx=>macOS 2023-09-18 15:09:51 -04:00
scivision
d7b73f14c2 FindMatlab: retrieve full major.minor.patch.tweak 2023-09-18 15:09:49 -04:00
scivision
8b8135487f FindMatlab: refactor: remove unneeded syntax 2023-09-18 15:07:53 -04:00
scivision
fff5c1507e FindMatlab: refactor: use registry query instead of execute_process
On Windows,
instead of executing "reg query" it's much simpler and more robust
to use cmake's built in registry query.

Remove unused variables. Significantly reduces amount of code in
function.
2023-09-18 15:07:52 -04:00
權少
3a54ee8cd5 FindQuickTime: Improve documentation formatting 2023-09-18 09:24:56 -04:00
權少
3cf5f4af54 FindProducer: Improve documentation formatting 2023-09-18 09:24:27 -04:00
權少
b35c17b202 FindPhysFS: Improve documentation formatting 2023-09-18 09:23:04 -04:00
Brad King
d007eb7046 Merge topic 'FindMatlab-r2023b'
cf7ea12a7e FindMatlab: Add R2023b=23.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8804
2023-09-18 08:50:10 -04:00
Brad King
e64c150b3f Merge topic 'FindLibXslt-cache-advanced'
fd0d1ae002 FindLibXslt: Mark LIBXSLT_LIBRARY and LIBXSLT_EXSLT_INCLUDE_DIR as advanced

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8807
2023-09-18 08:49:08 -04:00
Peter Kokot
fd0d1ae002 FindLibXslt: Mark LIBXSLT_LIBRARY and LIBXSLT_EXSLT_INCLUDE_DIR as advanced
Make them consistent with other artifacts' cache entries.
Also drop mark on non-cache variable.
2023-09-15 09:10:46 -04:00
scivision
cf7ea12a7e FindMatlab: Add R2023b=23.2
Matlab went to a new version numbering scheme with R2023b.
2023-09-15 09:03:32 -04:00
Ben Boeckel
6a3059e66f FindTIFF: bridge tiff-config into FindTIFF-compatible interface
`libtiff` upstream now provides a configuration of its own with the
`TIFF::tiff` target provided. Additionally, it uses lowercase for its
package name.
2023-09-14 15:57:04 -04:00
Brad King
6576ca15f6 Merge topic 'mingw-search-prefixes'
5e5132e1b1 MinGW: Search for packages in standard MSYSTEM environment prefixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8796
2023-09-14 12:50:41 -04:00
Brad King
5e5132e1b1 MinGW: Search for packages in standard MSYSTEM environment prefixes
MSYS2 and similar MinGW/MSYS distributions define development
environments with a `MSYSTEM` environment variable.  Each such
environment has a documented installation prefix for its packages,
often provided by a `MSYSTEM_PREFIX` environment variable.
Since commit 84a25fc263 (cmake_host_system_information: Add
MSYSTEM_PREFIX query, 2023-09-08) we can look up this prefix.

Add `$MSYSTEM_PREFIX/local` and `$MSYSTEM_PREFIX` to our system search
prefixes when targeting MinGW under `MSYSTEM` environments.  This is
their equivalent to `/usr/local` and `/usr`, which we search by default
on UNIX systems.

Issue: #24216
2023-09-13 08:35:59 -04:00
權少
90c3357c67 Findosg*: Improve documentation formatting
Add reST markup for inline literals, definition lists, and notes.
2023-09-12 12:54:39 -04:00
Brad King
bb3bdf4548 Merge topic 'Findosg-doc'
57a0a16b58 Findosg*: Improve documentation formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8792
2023-09-12 08:00:06 -04:00
Brad King
c6e07514a1 Merge topic 'FindMatlab-version'
8ea398a7af FindMatlab: Prefer to use VersionInfo.xml to get version, fallback to run

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8760
2023-09-12 07:57:11 -04:00
Brad King
9beb4dd8a7 Merge topic 'FindPkgConfig_extra_whitespace'
d47771bbb9 FindPkgConfig: ignore whitespace separators in version check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8789
2023-09-12 07:56:11 -04:00
Brad King
5d1f803a04 Merge topic 'FindBoost-1.83'
897a149067 FindBoost: Add support for Boost 1.83

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8793
2023-09-12 07:55:00 -04:00
Brad King
b07ab81faf Merge topic 'FortranCInterface-macos-deployment-target'
84a097f038 FortranCInterface: forward `CMAKE_OSX_DEPLOYMENT_TARGET`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8790
2023-09-12 07:53:44 -04:00
權少
57a0a16b58 Findosg*: Improve documentation formatting
Add reST markup for inline literals and cross-references.
2023-09-11 12:30:05 -04:00
Brad King
897a149067 FindBoost: Add support for Boost 1.83
Update the list of known versions.

Run the command

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

to extract dependencies from the 1.83.0 source tree.

Dependencies differ from 1.82, as mentioned in the 1.83 release notes:

* Boost.Timer no longer depends on Boost.Chrono

Fixes: #25243
2023-09-11 09:54:49 -04:00
Ben Boeckel
84a097f038 FortranCInterface: forward CMAKE_OSX_DEPLOYMENT_TARGET
GCC needs to be taught about every macOS release it seems, so older
builds may not support usage on newer releases by default.
2023-09-10 21:11:34 -04:00
scivision
8ea398a7af FindMatlab: Prefer to use VersionInfo.xml to get version, fallback to run
Parsing the version file is much faster than running Matlab.
It also improves reliability as Matlab silently quits or hangs
in some misconfigured environments.

For old Matlab, falls back to running Matlab.

also refactor file(STRINGS => file(READ as whole file was read anyway

Fixes: #25209
2023-09-09 22:23:05 -04:00
Paul Zander
d47771bbb9 FindPkgConfig: ignore whitespace separators in version check
The regex used to split up the version if it contains an operator fails
if the string contains whitespaces. Resulting in an extra whitespace
after the package name and before the package version leading to
breakage in pkgconf and thus webkit-gtk.

See:
https://github.com/pkgconf/pkgconf/issues/317
https://bugs.webkit.org/show_bug.cgi?id=261125
https://bugs.gentoo.org/913644
2023-09-09 13:49:19 +02:00
權少
7abb6d14ca FindLua{50,51}: Fix preformatted documentation blocks
Avoid duplicate `::`.
2023-09-08 15:34:35 -04:00
Brad King
8aa20b554f Merge topic 'FindFreetype-use-config'
d83d925045 FindFreetype: use `freetype-config.cmake` if available

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Ryan Krattiger <ryan.krattiger@kitware.com>
Merge-request: !8775
2023-09-08 09:02:58 -04:00
Brad King
ad484e24bf Merge topic 'IntelLLVM-debug-flags'
e30f0f89af IntelLLVM: Suppress -Rdebug-disables-optimization on debug builds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: LecrisUT <github@lecris.me>
Merge-request: !8764
2023-09-08 08:56:28 -04:00
Bram Metsch
e30f0f89af IntelLLVM: Suppress -Rdebug-disables-optimization on debug builds
IntelLLVM 2023.0.0 and above emit this remark if `-g` is used without
any `-O<level>` flag, which is our default behavior.  Add another flag
to suppress the remark.
2023-09-07 15:15:08 -04:00
Brad King
1c5e4b60b1 Merge topic 'FindPkgConfig-system-cflags'
252c66c697 FindPkgConfig: Tolerate PKG_CONFIG_SYSTEM_INCLUDE_PATH in environment
4507883135 Tests: Rename RunCMake.FindPkgConfig LIBRARY_PATH case to SYSTEM_PATH

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8768
2023-09-07 07:52:06 -04:00
Ben Boeckel
d83d925045 FindFreetype: use freetype-config.cmake if available
The official `freetype-config.cmake` provides `Freetype::Freetype` as an
`INTERFACE` library to its exported `freetype` target. This ends up
causing issues if CMake's Find module is used to define
`Freetype::Freetype` before using `freetype-config` because some, but
not all, of its defined targets are already available triggering the
generated code that detects such situations.

Instead, try to use `freetype-config` where possible and provide bridge
logic for this module's variable guarantees.
2023-09-06 18:15:44 -04:00
Cristian Le
252c66c697 FindPkgConfig: Tolerate PKG_CONFIG_SYSTEM_INCLUDE_PATH in environment
Tell `pkg-config --cflags` not to filter out `-I` flags for entries of
`PKG_CONFIG_SYSTEM_INCLUDE_PATH` (and `CPATH` for `pkgconf`).

Fixes: #25228
2023-09-06 12:17:39 -04:00