| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes: #20878
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
When both CMAKE_FIND_ROOT_PATH and CMAKE_PREFIX_PATH are set to
/opt/my_device_sysroot, cmFindCommon::RerootPaths would only look
for packages in /opt/my_device_sysroot/opt/my_device_sysroot
but would not try to look in /opt/my_device_sysroot.
Make sure to not reroot the prefix path in such a case.
Fixes: #21937
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
The OLD behaviors of all policies are deprecated, but only by
documentation. Add an explicit deprecation diagnostic for policies
introduced in CMake 3.14 and below to encourage projects to port
away from setting policies to OLD.
|
|
|
|
| |
Fixes #22207
|
|
|
|
| |
Detect MSYS as CYGWIN, with the required adaptations.
|
| |
|
|
|
|
| |
This enhancement is the first step for solving issue #21107
|
|
|
|
| |
Use 3.3 or 2.8.12 where possible.
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Removing FindQt.cmake gives Qt upstream a path forward to export its
own QtConfig.cmake files which can be found by find_package()
without having to explicitly specify CONFIG. Projects that still
want to use Qt3/4 can call find_package(Qt[34]), include(FindQt),
or add FindQt.cmake to their CMAKE_MODULE_PATH.
|
|
|
|
|
|
| |
Add documentation for both the CMake variable and environment variable
of this name pattern. Update references to these names to link to their
documents. Clarify the pattern used to construct their names.
|
|
|
|
|
|
|
|
| |
Policy `CMP0074` was added by commit eb35d8884b (find_package: Use
PackageName_ROOT variables as search prefixes, 2018-03-15). Revise the
logic to avoid warning when a `PackageName_ROOT` variable is set to
empty since that won't change the search behavior. Also, when we do
warn include the variable value(s) for reference.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This feature was originally added by commit v3.9.0-rc1~71^2~2 (find_*:
Add a new PackageRoot search path group, 2017-05-03) and documented by
commit v3.9.0-rc1~71^2 (find_*: Add docs for PackageRoot search path
group, 2017-05-03). However, we had to disable the feature and remove
the documentation in commit v3.9.1~2^2 (find_*: Disable the PACKAGE_ROOT
search path group for CMake 3.9, 2017-08-08) due to breaking projects
that used `PackageName_ROOT` variables themselves.
Add policy `CMP0074` to restore the `PackageName_ROOT` variable behavior
in a compatible way. Also revise the stack of root paths to store the
paths themselves rather than the package names. This way the policy can
be considered at the `find_package` call site instead of individual
`find_` calls inside a find module.
Co-Author: Chuck Atkins <chuck.atkins@kitware.com>
Issue: #17144
|
|\
| |
| |
| |
| |
| |
| |
| | |
e574bce1 Tests: Simplify RunCMake.find_package PackageRoot case regexes
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Chuck Atkins <chuck.atkins@kitware.com>
Merge-request: !1115
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Disable the feature added by commit v3.9.0-rc1~71^2~2 (find_*: Add a new
PackageRoot search path group, 2017-05-03) and remove documentation
added by commit v3.9.0-rc1~71^2 (find_*: Add docs for PackageRoot search
path group, 2017-05-03). Unfortunately the name `<pkg>_ROOT` may
already be set by projects for their own incompatible purposes. Disable
the behavior change for now to fix the regression for CMake 3.9. We can
restore it later with a policy.
In order to keep the implementation and tests working, add an
undocumented variable we can use in the tests to enable the behavior
before the policy is introduced.
Fixes: #17144
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
This was accidentally forgotten in commit v3.9.0-rc1~71^2~2 (find_*: Add
a new PackageRoot search path group, 2017-05-03).
Fixes: #17052
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit v3.9.0-rc1~58^2 (find_package: shorten output for missing
package in config mode, 2017-05-09) we print only the one line
- Could NOT find Foo (missing: Foo_DIR)
when package Foo cannot be found in CONFIG mode and it is not REQUIRED.
However, in the case that package configuration files were found but not
used, this one line message leaves out important information. This can
happen when a package configuration file sets `Foo_FOUND` to `FALSE` or
when its package version file does not match the requested version.
Restore the longer message in these cases. Otherwise a seemingly valid
explicit `Foo_DIR` setting appears to be silently ignored even if it was
considered.
Fixes: #17029
|
|\
| |
| |
| |
| |
| |
| |
| | |
d0b9d1cc find_package: shorten output for missing package in config mode
d9df805f cmFindPackageCommand: Split condition to improve readability
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !851
|
| |
| |
| |
| |
| |
| |
| | |
If CONFIG or MODULE is given and the package is not REQUIRED,
output a one-liner instead of the full warning.
Update Tests/RunCMake/find_package expected output to match.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit v3.4.0-rc1~321^2~2 (Genex: Store a backtrace, not a pointer
to one, 2015-07-08) we treat cmListFileBacktrace instances as
lightweight values. This was true at the time only because the
backtrace information was kept in the cmState snapshot hierarchy.
However, that forced us to accumulate a lot of otherwise short-lived
snapshots just to have the backtrace fields available for reference by
cmListFileBacktrace instances. Recent refactoring made backtrace
instances independent of the snapshot hierarchy to avoid accumulating
short-lived snapshots. This came at the cost of making backtrace values
heavy again, leading to lots of string coying and slower execution.
Fix this by refactoring cmListFileBacktrace to provide value semantics
with efficient shared storage underneath. Teach cmMakefile to maintain
its call stack using an instance of cmListFileBacktrace. This approach
allows the current backtrace to be efficiently saved whenever it is
needed.
Also teach cmListFileBacktrace the notion of a file-level scope. This
is useful for messages about the whole file (e.g. during parsing) that
are not specific to any line within it. Push the CMakeLists.txt scope
for each directory and never pop it. This ensures that we always have
some context information and simplifies cmMakefile::IssueMessage.
Push/pop a file-level scope as each included file is processed. This
supersedes cmParseFileScope and improves diagnostic message context
information in a few places. Fix the corresponding test cases to expect
the improved output.
|
| |
|
|
|
|
|
|
| |
Set the minimum required version of CMake high enough to avoid the
warning for CMAKE_LEGACY_CYGWIN_WIN32. The warning appears on stderr
and breaks the expected output matching.
|
| |
|
|
|
|
|
|
|
|
| |
This patch adds a test which checks the error message, which is
produced in the case that a Config file has set Foo_FOUND to FALSE
by itself.
Alex
|
|
|