Commit Graph

12628 Commits

Author SHA1 Message Date
Marc Chevrier
f1150f30cd Merge topic 'better_doxy_ver_check'
eaec9cf65d FindDoxygen: Implement more complete version checking

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !7442
2022-07-10 04:42:24 -04:00
Christian Heimlich
eaec9cf65d FindDoxygen: Implement more complete version checking
The foundation of the Doxygen Find Module's detection methodology
is the command `find_program`, which has inhibited the module from
properly handling user version restrictions when provided.

Because `find_program` historically has always returned after the first
match and does not consider version constraints, users of this module
are inadvertently at the mercy of the command's search procedure.
Essentially, `find_package(Doxygen ...)` will always provide the first
Doxygen build found through said procedure, even if it conflicts with
the user's version requirements, and even if another build exists on
the system that would satisfy those requirements (i.e. shadowing).

Utilizes the new `VALIDATOR` option of `find_program` to ensure all
otherwise detectable builds of Doxygen on a given system are evaluated
and that only a build in compliance with `Doxygen_FIND_VERSION`
et. al., when defined, will be matched against.

Also enables handling of version ranges specified within `find_package`
via the **FindPackageHandleStandardArgs** module.

Finally, ensures that only the major, minor, and patch components of
Doxygen's `--version` output are captured for comparison in cases where
it contains additional information, such as a git commit hash.

Fixes: #23692
2022-07-07 13:41:31 -04:00
Brad King
d213cf1193 Merge topic 'findwxwidgets-mingw-regression'
7d6e01801d FindwxWidgets: Do not reset wxWidgets_LIB_DIR unnecessarily
6dce42b171 FindwxWidgets: Restore win32 find style on MinGW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7451
2022-07-07 09:05:39 -04: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
Maarten Bent
7d6e01801d FindwxWidgets: Do not reset wxWidgets_LIB_DIR unnecessarily
Only reset it when `WX_ROOT_DIR` had a value.  This change allows to set
both `wxWidgets_LIB_DIR` and `wxWidgets_ROOT_DIR` at the same time when
they where previously `-NOTFOUND`.
2022-07-06 09:59:38 -04:00
Maarten Bent
6dce42b171 FindwxWidgets: Restore win32 find style on MinGW
Since commit 6fac8af9ca (FindwxWidgets: set wxWidgets_FIND_STYLE to unix
on MINGW, 2022-04-11, v3.24.0-rc1~296^2), we only tried unix find style
on MinGW.  However, only some MinGW builds have the `wx-config` needed
for unix find style.  Other builds, including those using the official
wxWidgets makefiles, do not provide `wx-config` and need to use win32
find style.  To accommodate both use cases, first use win32 find style
and if it fails, use unix find style.
2022-07-06 09:58:48 -04:00
Brad King
4ae8018ddf Merge topic 'FindOpenSSL-doc-pkg-config'
42199256af FindOpenSSL: Document use of pkg-config
475880f39b FindOpenSSL: Reformat hints documentation as definition list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7441
2022-07-06 09:17:42 -04:00
Brad King
0b05adebcc Merge topic 'lcc-additional-implicit-link-dirs'
0eea1e8563 LCC: for OpenMP, collectly determine implicit link dirs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7436
2022-07-06 08:53:47 -04:00
Maarten Bent
2a19231d61 FindwxWidgets: Support more wxWidgets versions, including 3.2
Update the example to use a more recent wxWidgets version.

Use a list with known version numbers when searching for installation directories and wx-config names.
2022-07-05 14:55:43 -04:00
Maarten Bent
853449429d FindwxWidgets: Use version number from header for library names 2022-07-05 14:55:43 -04:00
Maarten Bent
ed51e0bb75 FindwxWidgets: Move extracting version number to a macro 2022-07-05 14:55:43 -04:00
tofraa
42199256af FindOpenSSL: Document use of pkg-config
Issue: #17548
2022-07-05 11:54:40 -04:00
Brad King
475880f39b FindOpenSSL: Reformat hints documentation as definition list 2022-07-05 11:50:21 -04:00
Brad King
aa1eaf6b8a Merge topic 'nvhpc-Werror'
35ec676ace NVHPC: warnings as error flag is "-Werror"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7415
2022-07-05 10:32:55 -04:00
Brad King
c70ed631f7 Merge topic 'nvhpc-Werror' into release-3.24
35ec676ace NVHPC: warnings as error flag is "-Werror"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7415
2022-07-05 10:32:54 -04:00
Brad King
d5772027c2 Merge topic 'add_nvcc_compile_warning_support'
cd324110d2 CUDA: NVCC support for COMPILE_WARNING_AS_ERROR target property
2e9ac1d272 Tests: Refactor warn on error tests to support multiple languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7417
2022-07-05 10:31:23 -04:00
Brad King
6fee995256 Merge topic 'add_nvcc_compile_warning_support' into release-3.24
cd324110d2 CUDA: NVCC support for COMPILE_WARNING_AS_ERROR target property
2e9ac1d272 Tests: Refactor warn on error tests to support multiple languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7417
2022-07-05 10:31:22 -04:00
Craig Scott
c86c99fb54 Merge topic 'LINK_LIBRARY-Darwin-LIBRARY-features-enhancements'
537861664a Genex LINK_LIBRARY: MacOS: enhance *_LIBRARY features
c55d42eb42 Darwin.cmake: Fix indenting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7433
2022-07-04 23:53:14 -04:00
Marc Chevrier
537861664a Genex LINK_LIBRARY: MacOS: enhance *_LIBRARY features 2022-07-03 14:43:23 +10:00
Craig Scott
c55d42eb42 Darwin.cmake: Fix indenting 2022-07-03 14:43:23 +10:00
Brad King
f41b2b25a6 Merge topic 'findicu'
669b6a37f5 FindICU: Fix component reporting logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7430
2022-07-01 11:16:32 -04:00
Brad King
2ecdf00f07 Merge topic 'FindRuby-version-matching'
abe8192d82 FindRuby: Simplify version matching

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7425
2022-07-01 08:26:18 -04:00
Robert Maynard
35ec676ace NVHPC: warnings as error flag is "-Werror" 2022-07-01 08:05:19 -04:00
Robert Maynard
cd324110d2 CUDA: NVCC support for COMPILE_WARNING_AS_ERROR target property 2022-07-01 08:04:54 -04:00
makise-homura
0eea1e8563 LCC: for OpenMP, collectly determine implicit link dirs
It is found out for LCC to not specify all library search paths
when called by cmake_parse_implicit_link_info().
Because of that, FindOpenMP module can't find some libraries,
like libpthread. For this, we should analyze -print-search-dirs
output and append library paths to implicit link ones.
2022-06-30 22:48:45 +03:00
Alexander Grund
669b6a37f5 FindICU: Fix component reporting logic
Components were incorrectly reported as found because `component_found` is set to a string containing the variable name which is a truethy value.
Fix by simply merging the setter of `component_found` with the reporting setter instead of checking `component_found OR component_found_compat` which is overly verbose anyway.
2022-06-30 19:36:53 +02:00
Brad King
7375542615 Merge topic 'FindCURL-package-version'
886ba0b1d6 FindCURL: Set CURL_VERSION_STRING when curl is found as a package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7421
2022-06-30 08:35:55 -04:00
Diego Pino Garcia
abe8192d82 FindRuby: Simplify version matching 2022-06-30 09:51:15 +08:00
Brad King
ca8720c6af Merge topic 'FetchContent-avoid-IN_LIST'
5c7b6b29f9 FetchContent: Don't use if(... IN_LIST ...)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7423
2022-06-29 08:46:31 -04:00
Craig Scott
5c7b6b29f9 FetchContent: Don't use if(... IN_LIST ...)
This avoids the need for changing policy settings, which would then
propagate through to projects brought into the build via FetchContent.
2022-06-29 07:54:06 +10:00
makise-homura
886ba0b1d6 FindCURL: Set CURL_VERSION_STRING when curl is found as a package
FindCURL, when found as `curl-config.cmake`, will fill `CURL_VERSION`
instead of `CURL_VERSION_STRING` variable.  It may break some cases
when user is relying on correct value of the latter variable, and
as an example, already breaks `CMakeOnly.AllFindModules` test.
2022-06-28 11:15:24 -04:00
Brad King
6931487e52 Merge topic 'glew'
6c8789af75 FindGLEW: select_library_configuration might be used before it is defined

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7412
2022-06-28 09:24:24 -04:00
Brad King
3fcdc98b7d Merge topic 'FindPython-multiple-queries'
ece3bedbf2 FindPython: fix error on multiple queries with different COMPONENTS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7410
2022-06-28 09:22:55 -04:00
Brad King
e9213013e6 Merge topic 'FindPython-multiple-queries' into release-3.24
ece3bedbf2 FindPython: fix error on multiple queries with different COMPONENTS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7410
2022-06-28 09:22:54 -04:00
Brad King
f7d71beefa Merge topic 'revert-FindHDF5-library'
b5bc72574e FindHDF5: Revert "Add explicit library location instead of guessed ..."

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7416
2022-06-28 09:20:24 -04:00
Brad King
353a1357a7 Merge topic 'revert-FindHDF5-library' into release-3.24
b5bc72574e FindHDF5: Revert "Add explicit library location instead of guessed ..."

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7416
2022-06-28 09:20:23 -04:00
Brad King
808cbb7162 Merge topic 'lcc-liblfortran-renamed'
57da7a4925 LCC: link with -lgfortran instead of -llfortran since 1.26.03

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7407
2022-06-28 09:15:24 -04:00
Brad King
746bed40f2 Merge topic 'lcc-liblfortran-renamed' into release-3.24
57da7a4925 LCC: link with -lgfortran instead of -llfortran since 1.26.03

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7407
2022-06-28 09:15:23 -04:00
Brad King
b5bc72574e FindHDF5: Revert "Add explicit library location instead of guessed ..."
Revert commit e4e309f165 (FindHDF5: Add explicit library location
instead of guessed library name., 2022-03-22, v3.24.0-rc1~375^2).
The old behavior was not a guessed library name, but the name of an
imported target that can contain per-config locations and encode usage
requirements.  Although find modules do not normally return their
imported target names in the `_LIBRARIES` variable, FindHDF5 has done so
since commit 5201a3065b (FindHDF5: use the target rather than the path,
2017-01-04, v3.8.0-rc1~81^2).

Fixes: #23667
2022-06-27 13:51:33 -04:00
Marc Chevrier
ece3bedbf2 FindPython: fix error on multiple queries with different COMPONENTS
Ensure that multiple queries with different COMPONENTS specified in
different sub-directories are fully supported.
2022-06-27 13:16:29 -04:00
Igor Molchanov
57da7a4925 LCC: link with -lgfortran instead of -llfortran since 1.26.03
Since LCC 1.26.03, compiler developers decided to rename
liblfortran to libgfortran (internal reference: mcstbug#131633),
and despite it's stated that "-llfortran will be automatically
treated as -lgfortran", it actually does not work (and there's
even no symlinks like liblfortran.* -> libgfortran.*); so we
have to explicitly choose which library we have to link in.

Fixes: #23646
2022-06-27 13:02:53 -04:00
Markus Mützel
6c8789af75 FindGLEW: select_library_configuration might be used before it is defined
Fixes a regression from a31b270785
2022-06-26 10:38:11 +02:00
Brad King
dcfb2d5f5d Merge topic 'FindPython-use-VALIDATOR'
e8e5af0278 FindPython: enhance search criterias

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7401
2022-06-23 09:33:47 -04:00
Brad King
6760180f57 Merge topic 'findvulkan-volk'
f849e33452 FindVulkan: Add 'volk' component

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7382
2022-06-23 09:29:59 -04:00
Brad King
1c27316145 Merge topic 'findopenal-add-import-library'
91e3f2e088 ci: Enable FindOpenAL test on Linux builds
927e091949 FindOpenAL: Add imported target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7385
2022-06-23 09:28:55 -04:00
Brad King
4137cf1964 Merge topic 'ipo_append_auto_on_gcc'
fe57410b33 IPO: Use -flto=auto if compiler is GCC >= 10.1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7400
2022-06-23 09:24:59 -04:00
Brad King
0c2066f2d9 Merge topic 'ipo_append_auto_on_gcc' into release-3.24
fe57410b33 IPO: Use -flto=auto if compiler is GCC >= 10.1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7400
2022-06-23 09:24:58 -04:00
Brad King
d1e2090526 Merge topic 'revert-pkgconfig-static-libs'
7e4adcac82 FindPkgConfig: Revert "Populate _STATIC_LINK_LIBRARIES. Add STATIC_TARGET."

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7402
2022-06-23 09:21:26 -04:00
Marc Chevrier
e8e5af0278 FindPython: enhance search criterias
Use VALIDATOR option of find_* commands to add more criterias to the search:
* version
* architecture

Fixes: #22319
2022-06-22 16:47:56 +02:00