Commit Graph

128 Commits

Author SHA1 Message Date
Peter Kokot
0fedf1592c Find*: Update *_FOUND variables
This marks all `<PACKAGENAME>_FOUND` result variables as deprecated
where possible (for `<PackageName>` find modules) to make it clearer
which variable to use.

In CMake 3.3, the FindPackageHandleStandardArgs module was refactored to
set both `<PackageName>_FOUND` and uppercase `<PACKAGENAME>_FOUND`
result variables to the same values. Before that, the FOUND_VAR argument
could be used to set the result variable.

* FindMatlab: Uppercased MATLAB_FOUND is not mentioned as it was never
  documented.
* Documentation for FindPythonInterp and FindPythonLibs modules synced
  accordingly to their deprecation (3.12 instead of 4.2).
* OPENGL_FOUND: deprecation version synced with other find modules.
* DevIL_FOUND was introduced in CMake 3.8. The uppercased variant not
  mentioned as it was previously never documented.

Fixes: #27242
2025-09-23 21:40:58 +02:00
Peter Kokot
9e3d2cd94f FindPkgConfig: Deprecate PKG_CONFIG_FOUND
Since most of the find modules use the `<PackageName>_FOUND` result
variables, this now also syncs it for the FindPkgConfig module. The
`PkgConfig_FOUND` result variable is available since CMake 3.3 and
contains the same value. There is also `PKGCONFIG_FOUND` result variable
automatically set with the same value but for simplicity isn't
documented. The uppercased `<PACKAGENAME>_FOUND` result variables set by
find modules are also considered legacy variables.
2025-08-21 01:01:33 +02:00
Peter Kokot
867da42938 FindLAPACK: Sync documentation
- Added intro code block showing how to use this module.
- Reworded variable descriptions.
- Moved imported targets section to top.
- Added examples section.
2025-08-05 23:04:49 +02:00
Kitware Robot
1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Vito Gamberini
9ead7c2129 FindBLAS: Add support for NVPL 2025-02-26 13:29:03 -05:00
Nikita Nemkin
d138555959 Help: Use Title Case for all "Imported Targets" sections 2025-01-31 12:23:29 -05:00
Brad King
7afa58b15d Modules/Find*: Include FindPackageHandleStandardArgs normally
Since commit d74210a8bd (CMP0017: Remove support for OLD behavior,
2024-11-17) we can rely on CMP0017's NEW behavior unconditionally.
Calling `include(FindPackageHandleStandardArgs)` in a builtin module
will always get the builtin `FindPackageHandleStandardArgs`.
2025-01-30 08:53:12 -05:00
Kai Pastor
25b947589a Modules: Guard calls to pkg_check_modules
Before calling pkg_check_modules, modules must check PKG_CONFIG_FOUND.
When FindPkgConfig.cmake is loaded, pkg_check_modules is always defined
regardless of pkg-config being present. However, the whole module might
be disabled on user request with CMAKE_DISABLE_FIND_PACKAGE_PkgConfig.
This must not break Find modules which just look for a hint or similar.
2024-08-07 20:11:43 +02:00
Ian McInerney
847a25c823 FindBLAS/LAPACK: Add libblastrampoline support
libblastrampoline is a BLAS/LAPACK demuxing layer to allow selecting a
BLAS/LAPACK library at runtime.

Fixes: #25913
2024-05-29 09:21:07 -04:00
Martin Köhler
6ce94ae0b7 Find{BLAS,LAPACK}: Fix OpenBLAS ILP64 support with MSYS2 packages
Typically, ILP64 BLAS libraries are suffixed with `64`, but the MSYS2
package provides the ILP64 version of OpenBLAS with a `_64` suffix.
2023-11-13 09:58:26 -05:00
Cordell Bloor
272fe88ac6 Find{BLAS,LAPACK}: Add AOCL BLIS/libFLAME
The AMD Optimizing CPU Libraries (AOCL) provide forks of BLIS and
libFLAME that are optimized for AMD "Zen" core architectures.

Closes: #23605
2023-05-02 10:56:15 -04:00
Brad King
9d18426c47 Find{BLAS,LAPACK}: Prefer BLA_VENDOR cmake variable over env variable
This is implied by the documentation, but was not implemented properly.

Fixes: #24664
2023-04-03 09:58:58 -04:00
Alex Turbov
435b0c573c Help: Fix some redirects reported with sphinx linkcheck
Mostly it's about replace `http:` with `https:` protocol.
2022-11-07 10:07:36 -05:00
Brad King
a502c11a44 Merge topic 'FindLAPACK-nvhpc'
28d52a43fc FindLAPACK: Add '-fortranlibs' flag only with NVHPC/PGI compilers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7452
2022-07-07 09:02:02 -04:00
Eisuke Kawashima
28d52a43fc FindLAPACK: Add '-fortranlibs' flag only with NVHPC/PGI compilers
Since commit 2c9e623e31 (Find{BLAS,LAPACK}: Add support for the NVHPC
LAPACK library, 2021-05-05, v3.21.0-rc1~192^2) we try the `-fortranlibs`
option as a dependency of the NVHPC LAPACK.  That flag is specific to
the NVHPC/PGI compilers, so use it conditionally with them.

Without this modification, CMake fails to find LAPACK if

- compiler ID is GNU
- `BLA_STATIC` is `ON`
- `BLA_VENDOR` is not defined or set to `All`

Fixes: #23705, #22878
2022-07-06 13:58:47 -04:00
Dr. Thomas Orgis
70f15d202f Modules/Find{BLAS,LAPACK}: allow choice of pkg-config package
The BLA_PREFER_PKGCONFIG switch is not that useful if you are not able
to specify the pkg-config package to use. This adds BLA_PKGCONFIG_BLAS
and BLA_PKGCONFIG_LAPACK to that effect, allowing user choice in
environments that install differing variants of the BLAS libraries
with distinct .pc file names.

This is part of work to get more standardized installations of the
BLAS libs with specific names, likely blas.pc and lapack.pc only
for Netlib reference code, or maybe blas-netlib.pc and lapack-netlib.pc,
in any case distinct from choices like openblas-openmp.pc.
2022-06-17 10:43:38 +02:00
nega
655582e931 FindLAPACK: Quiet pkg-config errors
Issue: #23314
2022-03-30 16:01:56 -04:00
Igor S. Gerasimov
816dc1cb19 FindBLAS: Replace set(A val) with string(APPEND) 2021-10-07 09:33:51 -04:00
Igor S. Gerasimov
a7843faa20 FindLAPACK: Replace set(A val) with string(APPEND) 2021-10-07 09:33:51 -04:00
Igor S. Gerasimov
91fd645d46 FindLAPACK: Stop processing if LAPACK library does not have 64-bit integer API 2021-10-05 23:41:36 +09:00
Igor S. Gerasimov
d2f5c7856f FindLAPACK: Search 32/64-bit integer API via BLA_SIZEOF_INTEGER if possible 2021-10-05 23:41:36 +09:00
Igor S. Gerasimov
2531e464df FindLAPACK: Update Generic LAPACK 2021-09-22 15:16:22 -04:00
Igor S. Gerasimov
8fdbd272b5 FindLAPACK: Update FlexiBLAS 2021-09-22 15:16:22 -04:00
Igor S. Gerasimov
285c518937 FindLAPACK: Update OpenBLAS 2021-09-22 15:16:21 -04:00
Igor S. Gerasimov
9f52532757 FindLAPACK: Update NVHPC 2021-09-22 15:16:21 -04:00
Igor S. Gerasimov
7cb89314dd FindLAPACK: EML: LAPACK is in BLAS 2021-09-22 15:16:21 -04:00
Igor S. Gerasimov
f17f20f6cd FindLAPACK: IBMESSL: LAPACK is in BLAS 2021-09-22 15:16:21 -04:00
Igor S. Gerasimov
8a859fd6ae FindLAPACK: Fujitsu_SSL2: LAPACK is in BLAS 2021-09-22 15:16:21 -04:00
Brad King
c2dd240f00 Merge topic 'SCS_mp'
069a5c3188 FindLAPACK: SCSL also has LAPACK routines
dbcc5eaa05 FindBLAS: Update SCSL library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6402
2021-07-29 08:41:13 -04:00
Igor S. Gerasimov
03913b12cb FindLAPACK: IBM ESSL 6.1 also has LAPACK routines 2021-07-28 09:17:29 -04:00
Igor S. Gerasimov
069a5c3188 FindLAPACK: SCSL also has LAPACK routines 2021-07-28 16:01:14 +03:00
Seth R Johnson
76487b04b1 Find{BLAS,LAPACK}: clean variables 2021-07-14 11:00:20 -04:00
Seth R Johnson
fc54e68c05 Find{BLAS,LAPACK}: improve found message on Cray
With Cray compiler wrappers (implicitly tested on OLCF Spock) the
BLAS and LAPACK libraries are automatically linked as necessary through
the wrapper script and programming environment. With this change, the
configure output is:
```
-- Found BLAS: implicitly linked
<snip>
-- Found LAPACK: implicitly linked
```
rather than
```
-- Found BLAS: 1
<snip>
-- Found LAPACK: LAPACK_LIBRARIES-PLACEHOLDER-FOR-EMPTY-LIBRARIES
```
2021-07-14 10:59:59 -04:00
Brad King
57dcde19da Find{BLAS,LAPACK}: Avoid clobbering results when no vendor is requested
Logic added by commit 4c74c86f40 (FindBLAS/LAPACK: Add support for the
Fujitsu SSL2 library, 2021-01-27, v3.21.0-rc1~402^2~1) accidentally
expressed a boolean condition without proper grouping.  The pattern was
then copied by commit 2c9e623e31 (Find{BLAS,LAPACK}: Add support for the
NVHPC LAPACK library, 2021-05-05, v3.21.0-rc1~192^2).  The resulting
logic incorrectly tries Fujitsu and NVHPC vendors even after results are
found from another vendor, and then erases those.  Fix the grouping.

Fixes: #22403
2021-07-12 11:08:05 -04:00
Brad King
13b40c1ea2 Merge topic 'FindBLAS-LAPACK-docs'
5bf1651452 Find{BLAS,LAPACK}: Revise and extend Intel MKL usage documentation
8585a12bd9 Find{BLAS,LAPACK}: Move enabled language requirement to top of documentation
6a7c055f96 Find{BLAS,LAPACK}: Revise formatting of intro docs
43b581367d Find{BLAS,LAPACK}: Move implementation note from docs to comments
3beac78a13 Find{BLAS,LAPACK}: Revise imported targets documentation layout
6f305cd5fd Find{BLAS,LAPACK}: Factor out vendor documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6218
2021-06-14 09:48:37 -04:00
Brad King
5bf1651452 Find{BLAS,LAPACK}: Revise and extend Intel MKL usage documentation
Fixes: #22295
2021-06-11 08:41:25 -04:00
Brad King
8585a12bd9 Find{BLAS,LAPACK}: Move enabled language requirement to top of documentation 2021-06-11 08:40:37 -04:00
Brad King
6a7c055f96 Find{BLAS,LAPACK}: Revise formatting of intro docs 2021-06-11 08:02:59 -04:00
Brad King
43b581367d Find{BLAS,LAPACK}: Move implementation note from docs to comments 2021-06-11 08:00:22 -04:00
Brad King
3beac78a13 Find{BLAS,LAPACK}: Revise imported targets documentation layout 2021-06-11 07:58:15 -04:00
Brad King
6f305cd5fd Find{BLAS,LAPACK}: Factor out vendor documentation
Move the list of vendors to a dedicated section shared by both modules.
Format it as a definition list.
2021-06-11 07:51:37 -04:00
Peter Knowles
130fa72bb3 Find{BLAS,LAPACK}: Update for Intel oneAPI structure under MKLROOT
Add search paths for the Intel oneAPI MKL directory structure
so that we do not rely on paths in `LD_LIBRARY_PATH`.
2021-06-11 06:55:09 -04:00
Robert Maynard
2c9e623e31 Find{BLAS,LAPACK}: Add support for the NVHPC LAPACK library 2021-05-05 12:04:32 -04:00
Brad King
cb6889a09c FindLAPACK: Fix finding generic LAPACK with BLA_STATIC
Fixes: #21071
2021-04-21 14:41:46 -04:00
Brad King
193714d67d Find{BLAS,LAPACK}: Simplify search for static libraries
Now that `CHECK_{BLAS,LAPACK}_LIBRARIES` are functions, we can set
`CMAKE_FIND_LIBRARY_SUFFIXES` locally without affecting the global
state.  This avoids the need for local state switching that was added in
commit 9ef82d95d8 (FindBLAS: Fix detection of OpenMP as dependency of
BLA_STATIC, 2021-04-07, v3.20.1~3^2), so remove that.
2021-04-21 14:23:17 -04:00
Brad King
2e2db28e2f Find{BLAS,LAPACK}: Simplify check_function_exists state maintenance
Now that `CHECK_{BLAS,LAPACK}_LIBRARIES` are functions, we can set
`CMAKE_REQUIRED_QUIET` locally without affecting the global state.
2021-04-21 14:20:28 -04:00
Brad King
dcd604ee62 Find{BLAS,LAPACK}: Make library variable names more robust 2021-04-14 14:57:03 -04:00
Brad King
98ef6632d9 Find{BLAS,LAPACK}: Generalize recognition of dependencies as link flags 2021-04-14 14:57:03 -04:00
Brad King
a57c4eef76 Find{BLAS,LAPACK}: Convert internal CHECK_*_LIBRARIES to functions 2021-04-14 14:57:03 -04:00
Brad King
a5a6ac7033 Find{BLAS,LAPACK}: Clarify name of internal argument for dependencies 2021-04-14 14:57:03 -04:00