Commit Graph

12757 Commits

Author SHA1 Message Date
Craig Scott
b9175800a2 Merge topic 'fetchcontent-unset-wrong-nested-var'
d9a6e0ffc8 FetchContent: Fix unsetting wrong variable name after provider returns

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7663
2022-09-11 18:09:11 -04: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
Brad King
12de4ea2e8 Merge topic 'fphsa-error-message-empty-version-var'
8f50f135ae FPHSA: Improve error message when VERSION_VAR is empty or has been unset()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7527
2022-09-09 10:06:45 -04:00
Brad King
e71605dfb4 Merge topic 'BSD'
1ea8b8ed86 BSD: Set CMAKE_HOST_BSD variable on a BSD host
288f72efea BSD: Only use BSD as variable for target BSD system

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7648
2022-09-09 10:05:41 -04:00
Marc Chevrier
281113af87 Merge topic 'useswig-perl-module'
5156eb5613 UseSWIG: track generated Perl module files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7654
2022-09-09 10:04:50 -04:00
Brad King
08930f76ef Merge topic 'fetchcontent-extra'
629d106c5e Help: Fix typo in FetchContent example, extras should read extra

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: hinell <al.neodim@gmail.com>
Merge-request: !7657
2022-09-09 09:53:41 -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
Thomas Weißschuh
5156eb5613 UseSWIG: track generated Perl module files
This makes sure the generated file is cleaned properly and allows to
create dependencies on it.
2022-09-08 14:55:46 +02:00
Andrea Pappacoda
8f50f135ae FPHSA: Improve error message when VERSION_VAR is empty or has been unset()
Previously, when `VERSION_VAR` is set but empty, FPHSA emitted a
confusing error message, saying that the package was found but of an
unsuitable version "".  Fix the error message to state that the package
was not found.

Fixes: #23807
2022-09-07 10:11:06 -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
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
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
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
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
Cristian Adam
1ea8b8ed86 BSD: Set CMAKE_HOST_BSD variable on a BSD host
Also the BSD variable will be set in CMake scripting mode (-P).

Relates: #23853
2022-09-06 01:15:44 +02:00
Cristian Adam
288f72efea BSD: Only use BSD as variable for target BSD system
Instead of having multiple boolean variables, we only have one
string variable: BSD with the name of the target BSD system.

Relates: #23853
2022-09-06 01:02:34 +02: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
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
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