Commit Graph

12744 Commits

Author SHA1 Message Date
Brad King
d4c8111da4 Clang/Windows: Clarify name of internal runtime library flags variables
Also avoid extra spaces in resulting flag strings.
2022-09-13 11:19:07 -04:00
Brad King
c3dafa24b2 Merge topic 'cpack-reuse-cmake-tools'
0c638ab597 CPack: re-use paths of tools discovered by CMakeFindBinUtils

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7635
2022-09-07 09:49:12 -04:00
Brad King
dae13c214f Merge topic 'cuda_support_sm90a'
234aa7e0aa CUDA: Support upcoming sm90a architecture

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7649
2022-09-07 09:48:25 -04:00
Brad King
8fe6d06c2c Merge topic 'zlib-windows-cross-compile-fix'
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:12 -04:00
Brad King
f6813c4159 Merge topic 'findCUDAToolkit_declare_deps_for_targets_once'
f0918fe505 FindCUDAToolkit: Correctly state cusolver and cublas dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7633
2022-09-07 09:38:01 -04:00
Robert Maynard
234aa7e0aa CUDA: Support upcoming sm90a architecture
The architecture values are being extended to have at time
a trailing `a`. This updates the CMake regex to support
this syntax.
2022-09-06 11:09:46 -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
Matteo Martelli
0c638ab597 CPack: re-use paths of tools discovered by CMakeFindBinUtils
`CMakeFindBinUtils.cmake` sets `CMAKE_<TOOL>` variables that in
cross-compilation environments point to the toolchain specific
executables: e.g. `CMAKE_OBJCOPY` might point to
`<path_to_toolchain>/arm-poky-linux-gnueabi-objcopy`.
Pass this information to CPack.
2022-09-06 09:49:54 -04:00
Brad King
138337f53c Merge topic 'implicit-link-info-msvc'
93f2cd5b7c CMakeParseImplicitLinkInfo: Better detection of msvc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7619
2022-09-06 09:02:05 -04:00
Craig Scott
c14494f19f Merge topic 'doc-fetchcontent-gtest-example'
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:24 -04:00
Craig Scott
9bbd5f71e9 Merge topic 'ExternalProject-default-git-tag'
2a21555ea7 ExternalProject: note the default of `GIT_TAG` being `master`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7631
2022-09-04 09:35:15 -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
Brad King
4f91d9d2c7 Merge topic 'CMakeFindFrameworks-brew-arm64'
5bfe33f092 CMakeFindFrameworks: Fix Brew 'Frameworks' path on Apple Silicon

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7618
2022-09-02 09:00:09 -04:00
Brad King
de2b305ddd Merge topic 'matlab_root'
72dd680609 FindMatlab: follow CMP0074 <PackageName>_ROOT search behavior
ba74c58ca4 FindMatlab: add'l check that Matlab test version file exists

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7616
2022-09-02 08:55:59 -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
Robert Maynard
93f2cd5b7c CMakeParseImplicitLinkInfo: Better detection of msvc
Use the compiler id information in addition to checking for `cl.exe`.
2022-09-02 08:04:39 -04:00
Jean-Baptiste Noël
5bfe33f092 CMakeFindFrameworks: Fix Brew 'Frameworks' path on Apple Silicon
This approach is compatible with both Intel and Apple Silicon
architectures.

`/usr/local/Frameworks` was added in commit 9970cdcb59
(CMakeFindFrameworks: Allow custom framework locations, 2016-07-30,
v3.7.0-rc1~296^2) unconditionally, but does not work on Apple Silicon.

```
x86_64 (Intel macOS):
$ brew --prefix
/usr/local

arm64 (Apple Silicon macOS):
$ brew --prefix
/opt/homebrew
```
2022-09-01 11:21:43 -04:00
Michael Hirsch
72dd680609 FindMatlab: follow CMP0074 <PackageName>_ROOT search behavior 2022-09-01 10:48:13 -04:00
Michael Hirsch
ba74c58ca4 FindMatlab: add'l check that Matlab test version file exists
this last resort check is for some HPC with "module load matlab"
not enacted that fail to catch in earlier checks. That would
error CMake configure even if find_package(Matlab) is not REQUIRED
2022-09-01 10:35:41 -04:00
Brad King
d10cbb0590 Merge topic 'add_language_levels_for_cxx26'
f808d8afb9 CMake: Support upcoming C++26 language level

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !7601
2022-09-01 10:04:46 -04:00
Brad King
61418f33ea Merge topic 'FindPostgreSQL-brew'
f799e0f23d FindPostgreSQL: Add brew-style directories to search path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7627
2022-09-01 09:59:29 -04:00
Robert Maynard
f808d8afb9 CMake: Support upcoming C++26 language level 2022-08-31 13:46:18 -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
8c6794abc7 Merge topic 'ctest-target-alias-args'
a79ccf7188 CTestTargets: Include CMAKE_CTEST_ARGUMENTS in CTEST_TEST_TARGET_ALIAS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7615
2022-08-31 09:46:40 -04:00
Brad King
6a7c60f3a3 Merge topic 'FindOpenGL-clarify-output'
3a3ecef473 FindOpenGL: Fix confusing output with CMP0072 and OpenGL preference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7604
2022-08-31 09:44:48 -04:00
Brad King
f7fc864c3a Merge topic 'FindOpenSP-module'
e706da5f7e FindOpenSP: Add module to find the OpenSP library
4bcdf1b992 ci: add OpenSP to Debian and Fedora base images

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7470
2022-08-31 09:42:07 -04:00
Brad King
b9371c0477 Merge topic 'CMAKE_FIND_USE_INSTALL_PREFIX-support-staging-prefix'
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:52 -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
Brad King
33a51cdf1d Merge topic 'FindBoost-1.80'
468a995346 FindBoost: Add support for Boost 1.80

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: مهدي شينون (Mehdi Chinoune) <mehdi.chinoune@hotmail.com>
Merge-request: !7600
2022-08-31 09:29: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
Cody Martin
a79ccf7188 CTestTargets: Include CMAKE_CTEST_ARGUMENTS in CTEST_TEST_TARGET_ALIAS
Extend the change from commit 4153d8445b (Add CMAKE_CTEST_ARGUMENTS
variable to pass command-line arguments to ctest, 2019-12-28,
v3.17.0-rc1~150^2) to cover the test target alias created by
`CTEST_TEST_TARGET_ALIAS` too.

This should allow:

    set(CMAKE_CTEST_ARGUMENTS -T Test --no-compress-output)
    set(CTEST_TEST_TARGET_ALIAS runtests)
    include(CTest)

to use the arguments as part of `make runtests`.

Fixes: #22239
2022-08-30 15:00:16 -04:00
Colton G. Rushton
3a3ecef473 FindOpenGL: Fix confusing output with CMP0072 and OpenGL preference
If the legacy `GL` library is found, report that instead of GLVND's
`OpenGL` in the "found" message.
2022-08-30 13:59:48 -04:00
Dawid Wróbel
e706da5f7e FindOpenSP: Add module to find the OpenSP library
OpenSP has not seen a release in seventeen years, so is unlikely to ever
provide a CMake package configuration file.  Add a find module instead.
2022-08-30 13:55:07 -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
Craig Scott
7198d12d5e Merge topic 'correct_cupti_search_paths'
1f3c3589f1 FindCUDAToolkit: Search the cuda toolkit include path for cupti

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7608
2022-08-26 06:50:40 -04:00
Robert Maynard
1f3c3589f1 FindCUDAToolkit: Search the cuda toolkit include path for cupti 2022-08-24 09:49:10 -04:00
Craig Scott
a8b274c74e Merge topic 'bsd-variables'
a20d7a9707 BSD: Set *BSD variables when targeting a *BSD system
2ae42d0aa3 kFreeBSD: Do not unset LINUX variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7573
2022-08-22 17:37:49 -04:00
Cristian Adam
a20d7a9707 BSD: Set *BSD variables when targeting a *BSD system
Fixes: #23853
2022-08-21 09:27:59 +10:00
Cristian Adam
2ae42d0aa3 kFreeBSD: Do not unset LINUX variable
kFreeBSD is a Debian GNU distribution with a kernel from FreeBSD,
and should be marked as LINUX.
2022-08-21 09:27:35 +10:00
Brad King
7b9757e507 Merge topic 'cuda_mark_toolkit_includes_as_system'
ea659b155d CUDA: Always mark cuda toolkit as system include

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7476
2022-08-19 07:25:00 -04:00
Robert Maynard
ea659b155d CUDA: Always mark cuda toolkit as system include
Fixes: #23731
2022-08-18 10:37:06 -04:00
Brad King
c88bf61c8d Merge topic 'fortran-compiler-list'
35759e2497 Fortran: cleanup compiler default search list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7548
2022-08-17 14:19:33 -04:00
Brad King
8ad94b1977 Merge topic 'FindVulkan-tolerate-FATAL_ERROR'
9063674517 Help: Add 3.24 release note about FindVulkan component enforcement
bc01362368 FindVulkan: Restore tolerance of unknown FATAL_ERROR component

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7583
2022-08-17 10:16: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
8c144f0682 Merge topic 'output_all_attempts_at_compiler_detection'
9c5bd7fe3a CompilerId: Output errors from all attempts at detection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7576
2022-08-17 08:44:26 -04:00
Brad King
4a82938d60 Merge topic 'nvhpc_fpie_support'
52dc49deb9 NVHPC: Enable PIE support on linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !7564
2022-08-16 13:01:31 -04:00
Brad King
90607d182c Merge topic 'mingw-windres'
e9755bc7c1 MinGW: Restore using windres when toolchain-prefixed name is not available

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7574
2022-08-16 12:43:53 -04:00
Robert Maynard
9c5bd7fe3a CompilerId: Output errors from all attempts at detection
Instead of printing the output of the last attempt, print
the output of all attempts. This shows users that CMake isn't ignoring any provided flags ( LANG_FLAGS ).
2022-08-16 11:59:46 -04:00
Michael Hirsch
35759e2497 Fortran: cleanup compiler default search list
Made GNU gfortran be last in the list as per the docstring
immmediately preceding.
One high-level version-free name per vendor.
2022-08-16 06:20:06 -04:00