Commit Graph

12592 Commits

Author SHA1 Message Date
Brad King
bc01362368 FindVulkan: Restore tolerance of unknown FATAL_ERROR component
`find_package(Vulkan REQUIRED FATAL_ERROR)` calls exist in the wild, but
`find_package` does not have a `FATAL_ERROR` option.  We silently
tolerated such calls prior to commit 6e4d20921d (FindVulkan: Add
component for `shaderc_combined`, 2022-05-18, v3.24.0-rc1~111^2~5), by
treating the argument as a component and ignoring it.  Restore tolerance
by removing the component and warning about it.

Fixes: #23849
2022-08-17 09:52:12 -04:00
Brad King
e9755bc7c1 MinGW: Restore using windres when toolchain-prefixed name is not available
Since commit 55ba10dcfd (MSYS/MinGW Makefiles: Simplify selection of
windres as Resource Compiler, 2022-05-26, v3.24.0-rc1~82^2) the `MinGW
Makefiles` and `MSYS Makefiles` generators no longer specify the plain
`windres` name for the MinGW resource compiler.  Instead, the name is
specified in our MinGW platform information module. After the change in
commit af4adf6aa9 (MinGW: Fix default windres selection when
cross-compiling, 2020-03-25, v3.18.0-rc1~492^2), when cross-compiling,
we only specify the toolchain-prefixed name of the tool, which may not
be available in all environments.

If the toolchain-prefixed name is not available, fall back to the plain
`windres` name.  We already use this approach for other binutils.

Fixes: #23841
2022-08-15 13:57:58 -04:00
Brad King
732cad4952 Merge topic 'warning-as-error-ti-compiler' into release-3.24
1cd65dfa0e TI compiler: Add support for COMPILE_WARNING_AS_ERROR target property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Josef Angstenberger <code@jtxa.de>
Merge-request: !7560
2022-08-15 10:51:44 -04:00
Brad King
2d08a35b50 Merge topic 'mingw-flto' into release-3.24
7b2a87c2eb IPO: Do not use -flto=auto with GCC 10.x on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7559
2022-08-15 10:48:26 -04:00
Craig Scott
1cd65dfa0e TI compiler: Add support for COMPILE_WARNING_AS_ERROR target property 2022-08-12 08:27:19 +10:00
Brad King
7b2a87c2eb IPO: Do not use -flto=auto with GCC 10.x on Windows
Revise the change from commit fe57410b33 (IPO: Use -flto=auto if
compiler is GCC >= 10.1, 2022-06-22, v3.24.0-rc2~2^2) to require
at least GCC 11 on Windows.

Fixes: #23836
Issue: #23640
2022-08-10 14:49:34 -04:00
Brad King
7203963788 FindThreads: Skip check for -pthread flag when targeting the MSVC ABI
Since commit 3257c34073 (FindThreads: avoid failing in AIX when using
-D_XOPEN_SOURCE=500, 2022-04-30, v3.24.0-rc1~197^2) we no longer check
for `pthreads.h` before checking for the `-pthread` flag.  Compilers
targeting the MSVC ABI do not have such a flag, so avoid performing the
check unnecessarily.

Fixes: #23829
2022-08-08 12:41:57 -04:00
Brad King
3a38f6c618 Merge topic 'fetchcontent-set-CMAKE_VERIFY_INTERFACE_HEADER_SETS' into release-3.24
2a9cc3e8e8 FetchContent: Disable header set verification for dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7535
2022-08-04 09:34:47 -04:00
Craig Scott
2a9cc3e8e8 FetchContent: Disable header set verification for dependencies
The CMAKE_VERIFY_INTERFACE_HEADER_SETS variable is intended to
be under the control of the user. It doesn't discriminate between
header sets defined in the main project and those defined by
dependencies brought into the build directly via FetchContent.
Developers will usually only be interested in verifying the main project's
header sets, not those from dependencies.

Make the variable effectively only enable header set verification of the
main project by turning it off during FetchContent_MakeAvailable() calls.
The user still has variables like CMAKE_PROJECT_INCLUDE and
CMAKE_PROJECT_<projectName>_INCLUDE available to them if they
want to enable verification of all or specific dependencies respectively.

Fixes: #23808
2022-08-04 09:43:10 +10:00
Michael Hirsch
3e2094fb9b FindLua: Improve documentation formatting
Since commit cb811d11ce (Help: Improve description of modules,
2019-04-12, v3.15.0-rc1~210^2) we've had two `::` prompts for
the preformatted block listing the result variables.  Convert the
block to a definition list.
2022-08-03 09:56:38 -04:00
Brad King
e0a39aeade Merge topic 'FindGTest-gmock-needs-gtest' into release-3.24
1aa95e1a3b FindGTest: Create the gmock targets only when GTest has been found

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7523
2022-08-01 10:02:24 -04:00
Robert Maynard
1aa95e1a3b FindGTest: Create the gmock targets only when GTest has been found
When we introduced the `GTest::gmock` and `GTest::gmock_main` targets in
commit 50bf457a0d (FindGTest: Add target for gmock library, 2021-10-17,
v3.23.0-rc1~321^2) we failed to handle the case where GTest isn't found.
Don't construct gmock targets that depend on non-existent gtest targets
when gtest failed to be found.
2022-07-29 14:05:55 -04:00
Craig Scott
fd95769ccf FetchContent: Restore support for multiple URL values
In c2044fdf3f (FetchContent: Respect the CMP0135 policy setting,
2022-06-02), the URL keyword was wrongly assumed to only have
a single value. Multiple URL values are allowed if they are all
non-local. Rework the logic to remove that incorrect assumption
and handle both single and multi-value URL combinations.

Fixes: #23792
2022-07-29 20:58:08 +10:00
MACHIZAUD Andréa
0b538e4002 FindVulkan: Add missing 3.24 release notes 2022-07-25 14:04:43 -04:00
Brad King
db66c384fc FindVulkan: Format component documentation as definition list 2022-07-25 14:04:43 -04:00
Brad King
f92964bf49 Merge topic 'findwxwidgets-mingw-regression' into release-3.24
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:38 -04:00
Brad King
acc6a08641 Merge topic 'FindLAPACK-nvhpc' into release-3.24
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:01 -04:00
Brad King
05a5d351f4 Merge branch 'FindLAPACK-nvhpc' into release-3.23
Merge-request: !7452
2022-07-07 09:01:20 -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
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
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
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
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
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
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
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
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
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
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
7e4adcac82 FindPkgConfig: Revert "Populate _STATIC_LINK_LIBRARIES. Add STATIC_TARGET."
Revert commit 020976d637 (FindPkgConfig: Populate
_STATIC_LINK_LIBRARIES. Add STATIC_TARGET., 2021-12-31,
v3.24.0-rc1~105^2).  Several regressions have been reported.
Revert the feature pending further discussion and design work.

Issue: #21714
Fixes: #23642
2022-06-22 10:13:00 -04:00
Linus Dierheimer
fe57410b33 IPO: Use -flto=auto if compiler is GCC >= 10.1
Since GCC 12.1, the `-flto` option warns unless given an explicit
LTRANS job count.

Issue: #23640
2022-06-22 09:09:16 -04:00
Brad King
aae6a67e5c Merge topic 'FetchContent-doc-example' into release-3.24
641d97e03f FetchContent: Fix example code in documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !7393
2022-06-22 08:50:26 -04:00
Brad King
e38783f16b Merge topic 'FindMPI-l-colon' into release-3.24
a606609499 FindMPI: Parse '-l:' flags in pkg-config output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7392
2022-06-22 08:49:31 -04:00
Brad King
0b86798a53 Merge topic 'xcode14' into release-3.24
7c79fde5fb Xcode: automatically create Info.plist for signing during compiler id
116cc5a57b cm_cxx_features: filter out warnings from Xcode 14

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7391
2022-06-22 08:47:37 -04:00
Brad King
5022b42f8b ExternalProject: Fix regression in stamp creation for Xcode+iOS
The change to `_ep_add_mkdir_command` in commit 5fbac2bb24
(ExternalProject: Move inline scripts to separate files, 2022-01-22,
v3.23.0-rc1~101^2) did not account for the possibility that
`CMAKE_CFG_INTDIR` is `$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)`
instead of just the configuration name.  Pass the value into the helper
script on the command line so that the native buildsystem placeholders
are evaluated.

Fixes: #23645
2022-06-21 18:27:44 -04:00
Brad King
7b622f3e80 ExternalProject: Fix regression in stamp creation for Xcode+iOS
The change to `_ep_add_mkdir_command` in commit 5fbac2bb24
(ExternalProject: Move inline scripts to separate files, 2022-01-22,
v3.23.0-rc1~101^2) did not account for the possibility that
`CMAKE_CFG_INTDIR` is `$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)`
instead of just the configuration name.  Pass the value into the helper
script on the command line so that the native buildsystem placeholders
are evaluated.

Fixes: #23645
2022-06-21 18:26:22 -04:00
Markus Mützel
a606609499 FindMPI: Parse '-l:' flags in pkg-config output
With the msmpi package in MSYS2:

    $ pkg-config --libs msmpi
    -LC:/msys64/mingw64/lib -l:libmsmpi.dll.a

MSYS2-Issue: https://github.com/msys2/MINGW-packages/pull/11839
Fixes: #23620
2022-06-21 12:38:30 -04:00
pigeon
641d97e03f FetchContent: Fix example code in documentation 2022-06-21 12:31:00 -04:00
Gregor Jasny
7c79fde5fb Xcode: automatically create Info.plist for signing during compiler id
Extend the Xcode 14 update from commit 89e1113e0c (Xcode: Use ad-hoc
signing during compiler id on macOS, 2022-06-10, v3.24.0-rc1~13^2~2).
2022-06-21 10:49:45 -04:00
Brad King
012eb49263 Merge topic 'fetchcontent-global-targets' into release-3.24
f19b48e0b8 FetchContent: Honor CMAKE_FIND_PACKAGE_TARGETS_GLOBAL
1305bade56 Help: Add missing version directive for find_package() GLOBAL keyword

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7347
2022-06-11 06:13:57 -04:00
Brad King
61c357a021 Merge topic 'xcode-14' into release-3.24
627c08e28b Tests: Teach RunCMake to ignore Xcode DVTSDK warnings
ab40020b17 Xcode: Suppress "Run Script" build phase warning during compiler id
89e1113e0c Xcode: Use ad-hoc signing during compiler id on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7350
2022-06-11 05:39:10 -04:00