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.
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
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
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.
`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.
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
```
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
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
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
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.