| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Allow find package to promote scope of imported targets by specifying
an argument to `find_package` or by specifying a CMake variable.
* Add support for CMAKE_GLOBAL_IMPORT_SCOPE variable
* Add support for GLOBAL argument to find_package
Additionally add testing for above features.
|
|
|
|
|
|
|
|
|
| |
Extend the feature added by commit d7b18895bc (cmake: Add filtered
debug-find options, 2021-12-07, v3.23.0-rc1~217^2) to enable debug
output for `find_*` calls within a find module or cmake package
configuration file.
Fixes: #23211
|
| |
|
|
|
|
|
| |
Otherwise, if there are no paths considered then the output does not
specify the name of the package.
|
| |
|
|
|
|
| |
Also spell out more complete content in the test's expect output.
|
|
|
|
|
|
| |
The overload for `--debug-find-pkg` has the same signature as the base
class method for `--debug-find-var`. To avoid confusion, drop the
overload and inline it its only call site.
|
|
|
|
| |
Fixes: #20878
|
| |
|
|
|
|
|
| |
In the old implementation, CMAKE_[SYSTEM_]IGNORE_PATH was handled
in cmFindCommon. Move it into cmFindPackageCommand.
|
|
|
|
|
|
|
|
|
|
| |
Add a `--debug-find-pkg=` option to debug find calls for specific
packages.
Add a `--debug-find-var=` option to debug find calls for specific
return variables.
Fixes: #21880
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a `CMAKE_REQUIRE_FIND_PACKAGE_<PackageName>` variable is complement
to `CMAKE_DISABLE_FIND_PACKAGE_<PackageName>` with just the opposite
behaviour: it turns non-required find_package call into the required one.
While optional package dependencies usually result in simple and clean
build logic, sometimes people want to be sure those optional
dependencies will be found and used. Examples are reproducible builds
and build instructions for 3rd parties. People choose to make
find_package calls REQUIRED and put them behind an option(). Such
workarounds blend build logic with build environment management and do
not look elegant.
|
|
|
|
| |
Fixes: #22038
|
| |
|
|
|
|
|
| |
CMake uses explicit 'this->' style. Using custom clang-tidy check we can
detect and fix places where 'this->' was missed.
|
|
|
|
|
|
|
|
| |
Fix the check added by commit 2ff1693066 (find_package: avoid showing
files as directories when searching config files, 2020-09-30,
v3.19.0-rc1~67^2) to avoid skipping the root prefix `/`.
Fixes: #21324
|
|\
| |
| |
| |
| |
| |
| | |
2ff1693066 find_package: avoid showing files as directories when searching config files
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5301
|
| |
| |
| |
| |
| |
| |
| | |
Teach `cmFileListGeneratorBase::Consider` to skip non-directories so
that all call sites get the check.
Fixes: #21212
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| | |
b423a20ce1 FindPackage: Provide better debug message when <PKG_FOUND> is false
a7acafc977 FindPackage: find_package(MODULE) respects CMAKE_FIND_DEBUG_MODE
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5256
|
| | |
|
| |
| |
| |
| | |
Fixes #21216
|
| |
| |
| |
| | |
This enhancement is the first step for solving issue #21107
|
|/
|
|
|
|
| |
* Use member initialisation at declaration
* AddFindDefinition: same signature as cmMakefile::AddDefinition for consistency
* Factorise version variables creation
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
eaad8072ee cmNonempty: Convenience inlines to check for non-empty string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5017
|
| | |
|
|/ |
|
|\
| |
| |
| |
| |
| |
| | |
7ed8c9ebe3 cmMakefile: add GetDefExpandList() that splits value into std::vector
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4819
|
| |
| |
| |
| | |
Combines cmMakefile:GetDefinition() and cmExpandList()
|
|/ |
|
|
|
|
|
|
|
|
|
| |
Arguably, many of these are bugs in `clang-tidy`. An if/else tree with
other conditionals between cloned blocks may be relying on the
intermediate logic to fall out of the case and inverting this logic may
be non-trivial.
See: https://bugs.llvm.org/show_bug.cgi?id=44165
|
| |
|
| |
|
|
|
|
|
| |
The find_package debug log messages are now easier to read when enabled by the
`--debug-find` command-line option or `CMAKE_FIND_DEBUG_MODE` variable.
|
|
|
|
|
|
| |
Teach the find_package, find_library, find_program, find_path, and
find_file commands to print debug log messages when enabled by the
`--debug-find` command-line option or `CMAKE_FIND_DEBUG_MODE` variable.
|
|
|
|
|
|
|
|
| |
Extend the change from commit 1d00ba9ccf (Find: find_package prefers
variable CMAKE_FIND_USE_REGISTRY, 2018-11-13, v3.16.0-rc1~461^2~1)
to cover the system package registry too.
Fixes: #19890
|
|
|
|
|
| |
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`. Use `clang-format` version 6.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provide a standardized way to handle the C++ "standard" headers
customized to be used with current CMake C++ standard constraints.
Offer under directory `cm` headers which can be used as direct
replacements of the standard ones. For example:
#include <cm/string_view>
can be used safely for CMake development in place of the `<string_view>`
standard header.
Fixes: #19491
|
|
|
|
|
| |
Replace string construction using std::stringstream with cmStrCat and
cmWrap.
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
d25a5a7ec9 clang-tidy: modernize-use-auto
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3783
|
| |
| |
| |
| |
| |
| | |
Set the MinTypeNameLength option to an impossibly high value in order
to limit the diagnostics to iterators. Leave new expressions and cast
expressions for later.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is generated by a python script that uses regular expressions to
search for string concatenation patterns of the kind
```
std::string str = <ARG0>;
str += <ARG1>;
str += <ARG2>;
...
```
and replaces them with a single `cmStrCat` call
```
std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...);
```
If any `<ARGX>` is itself a concatenated string of the kind
```
a + b + c + ...;
```
then `<ARGX>` is split into multiple arguments for the `cmStrCat` call.
If there's a sequence of literals in the `<ARGX>`, then all literals in the
sequence are concatenated and merged into a single literal argument for
the `cmStrCat` call.
Single character strings are converted to single char arguments for
the `cmStrCat` call.
`std::to_string(...)` wrappings are removed from `cmStrCat` arguments,
because it supports numeric types as well as string types.
`arg.substr(x)` arguments to `cmStrCat` are replaced with
`cm::string_view(arg).substr(x)`
|
|
|
|
|
|
|
|
|
| |
This replaces invocations of
- `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn`
- `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND`
- `cmSystemTools::IsOn` with `cmIsOn`
- `cmSystemTools::IsOff` with `cmIsOff`
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
8ed868606d find_package: Fix prefer-config mode to not fail on missing optional package
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3653
|