Commit Graph

12621 Commits

Author SHA1 Message Date
Brad King
eec8a7b681 Merge branch 'cpack-nsis-uninstaller' into release-3.24
Merge-request: !7774
2022-10-11 09:49:50 -04:00
Mika Fischer
8721658959 CPack/NSIS: Fix installer not waiting for uninstaller to finish
In commit b795c96727 (CPack/NSIS: Fix uninstall command when run from
installer, 2022-03-21, v3.23.0-rc5~9^2~1) we incorrectly removed the
`_?` parameter when calling the uninstaller during installation.
This parameter is however essential for ExecWait to actually wait for
the uninstaller to finish.  Without it, the uninstaller is started in
the background and installer and uninstaller run at the same time.

See https://nsis.sourceforge.io/Docs/Chapter3.html#installerusageuninstaller

Add back the `_?` parameter to fix this regression.  Use another
approach to solve the problem motivating the original change.

Fixes: #24041
2022-10-10 10:41:45 -04:00
Brad King
db53376b1f Merge topic 'add_cuda_11.8_new_archs' into release-3.24
7f4cbf6594 CUDA: Add support for the two new architectures in 11.8

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7761
2022-10-10 09:50:51 -04:00
Robert Maynard
7f4cbf6594 CUDA: Add support for the two new architectures in 11.8
CUDA 11.8 introduces ada ( 89 ), and hopper ( 90 ).
2022-10-07 15:58:53 -04:00
Michael Hirsch
13f3382b1c Intel/IntelLLVM: Fortran has distinct "-Werror"-like flag
Update the compiler options table added by commit 76a08cd253
(COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errors,
2022-04-21, v3.24.0-rc1~173^2) to use the Intel Fortran compilers'
dedicated `-warn*` flags.
2022-10-07 10:05:49 -04:00
Brad King
ab8a0a106e COMPILE_WARNING_AS_ERROR: Fix internal formatting of options table
In commit 76a08cd253 (COMPILE_WARNING_AS_ERROR: Add options to treat
warnings as errors, 2022-04-21, v3.24.0-rc1~173^2) we formatted the
options table entries as command-line string fragments.  Since they are
part of the `CMAKE_${lang}_COMPILE_OPTIONS_*` tables, they should be
formatted as `;`-separated lists of compiler options.
2022-10-07 10:05:21 -04:00
Erlend E. Aasland
e848ce21c9 CPack/IFW: Add support for QtIFW 4.4
Fixes: #24027
2022-10-05 15:48:08 -04:00
مهدي شينون (Mehdi Chinoune)
d34e5a98b8 LLVMFlang: Add support for Windows 2022-09-21 12:57:16 +01:00
Michael Hirsch
edbdfba3f5 FindMatlab: add R2022b 9.13 version map 2022-09-16 10:29:19 -04:00
Michael Hirsch
f0edac914a FindMatlab: Add MEX binary file suffix for Apple Silicon native Matlab
The Matlab MEX binary file suffix is distinct for Apple Silicon.
2022-09-14 14:05:35 -04:00
Brad King
ef75657851 Merge topic 'fetchcontent-redirect-version-exact' into release-3.24
48b380c961 FetchContent: Ignore EXACT for redirected find_package() calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7665
2022-09-12 09:38:06 -04:00
Brad King
20f36aae14 Merge topic 'FortranCInterface-LLVMFlang' into release-3.24
0f5b6dd215 FortranCInterface: Add support for LLVMFlang mangling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7658
2022-09-12 09:36:06 -04:00
Craig Scott
48b380c961 FetchContent: Ignore EXACT for redirected find_package() calls
When FetchContent_MakeAvailable() populates a dependency for which
find_package() integration is enabled, all future calls to find_package()
MUST succeed using the contents of the redirection directory. The
generated config version file was not handling calls where the EXACT
keyword was given, resulting in such calls rejecting the redirection
directory's contents and continuing its search. It is not allowed to do
that. Fix the generated file to also set PACKAGE_VERSION_EXACT to
true so that calls with EXACT now accept it, as was originally intended.

Fixes: #23950
2022-09-11 18:36:31 +10:00
Craig Scott
d9a6e0ffc8 FetchContent: Fix unsetting wrong variable name after provider returns
The unset() command was using __cmake_contentNameLower before that
variable was restored from the __cmake_fcCurrentVarsStack. That means
if there had been a nested call to FetchContent_MakeAvailable(), the wrong
variable name would have been cleared (the nested name instead of the
one from the current call). That would have left the variable set upon return,
blocking the dependency provider from seeing any further calls to
FetchContent_MakeAvailable() in the current variable scope or below for the
current dependency.
2022-09-10 18:23:21 +10:00
Gilles Gouaillardet
0f5b6dd215 FortranCInterface: Add support for LLVMFlang mangling
The following `module.f90` file

    module mymodule
    contains
      subroutine mysub()
      end subroutine
    end module

when compiled with `flang-new` (from LLVM 15.0.0) generate the
`_QMmymodulePmysub` symbol.

    $ flang-new -c module.f90
    $ nm module.o
    0000000000000000 T _QMmymodulePmysub

This commit fixes the regular expressions accordingly.
2022-09-09 10:37:56 -04:00
Mathieu Malaterre
629d106c5e Help: Fix typo in FetchContent example, extras should read extra
Amends 29e31e2825 (Packages: Integrate FetchContent and
find_package(), 2022-04-28)
2022-09-09 20:08:32 +10:00
Brad King
9a916eaae3 Merge topic 'zlib-windows-cross-compile-fix' into release-3.24
67b6f1a09b FindZLIB: fix CMAKE_FIND_LIBRARY_PREFIXES being unset when it was empty

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7647
2022-09-07 09:42:11 -04:00
Brad King
6a2fd8439a Merge topic 'findCUDAToolkit_declare_deps_for_targets_once' into release-3.24
f0918fe505 FindCUDAToolkit: Correctly state cusolver and cublas dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7633
2022-09-07 09:38:00 -04:00
Daniel Scharrer
67b6f1a09b FindZLIB: fix CMAKE_FIND_LIBRARY_PREFIXES being unset when it was empty
CMAKE_FIND_LIBRARY_PREFIXES and CMAKE_FIND_LIBRARY_SUFFIXES have
different behavior when undefined and when defined but empty:
Empty means to use an empty prefix/suffix while undefined means to
use a hardcoded default for the platform we are running on.

Unfortunately, set(a ${b}) will undefine a when b is empty,
meaning that when targeting a platform where either of these variables
is empty (e.g. Windows where CMAKE_FIND_LIBRARY_PREFIXES is empty)
the unpatched FindZLIB code ends up unsetting that variable, causing
all subsequent find_library calls to use the hardcoded default
for the runtime platform (e.g. "lib" for CMAKE_FIND_LIBRARY_PREFIXES
on Linux).

On the other hand, set(a "${b}") will always define a to be empty but
defined so we have to do this dance to fully preserve the state of these
variables.
2022-09-06 11:05:23 -04:00
Brad King
5d80d7cb6a Merge branch 'findCUDAToolkit_declare_deps_for_targets_once' into release-3.23
Merge-request: !7633
2022-09-06 09:14:57 -04:00
Craig Scott
6fcdd5adcf Merge topic 'doc-fetchcontent-gtest-example' into release-3.24
daa2a6cda6 Help: Fix wrong casing of GTest in FetchContent integration example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7644
2022-09-05 08:20:23 -04:00
Craig Scott
daa2a6cda6 Help: Fix wrong casing of GTest in FetchContent integration example 2022-09-04 17:18:09 +10:00
Robert Maynard
f0918fe505 FindCUDAToolkit: Correctly state cusolver and cublas dependencies
Fixes #23920
2022-09-02 12:24:40 -04:00
Ben Boeckel
2a21555ea7 ExternalProject: note the default of GIT_TAG being master
Reported on Discourse:

    https://discourse.cmake.org/t/fetchcontent-makeavailable-invalid-reference-master/6386
2022-09-02 08:20:53 -04:00
parkesb
f799e0f23d FindPostgreSQL: Add brew-style directories to search path
As of 14.5, homebrew names PostgreSQL directories with the version
number, e.g., `postgresql@14`.
2022-08-31 10:37:13 -04:00
Brad King
3aebeb1b55 Merge topic 'CMAKE_FIND_USE_INSTALL_PREFIX-support-staging-prefix' into release-3.24
0fc10bb19b CMAKE_FIND_USE_INSTALL_PREFIX considers CMAKE_STAGING_PREFIX
43d31c5198 cmFindBase: Refactor CMAKE_FIND_USE_INSTALL_PREFIX handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7623
2022-08-31 09:39:51 -04:00
Robert Maynard
0fc10bb19b CMAKE_FIND_USE_INSTALL_PREFIX considers CMAKE_STAGING_PREFIX
Fixes #23900
2022-08-30 17:52:40 -04:00
Kargatum
468a995346 FindBoost: Add support for Boost 1.80
Update the list of known versions.

Run the command

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

to extract dependencies from the 1.80.0 source tree.
They are the same as 1.79's dependencies, so just update
the version check for warning about newer versions.
2022-08-30 13:46:22 -04:00
Robert Maynard
1f3c3589f1 FindCUDAToolkit: Search the cuda toolkit include path for cupti 2022-08-24 09:49:10 -04:00
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