diff options
author | Brad King <brad.king@kitware.com> | 2022-11-17 21:26:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-11-18 15:31:19 (GMT) |
commit | fb9a3d0c7da7dd581d378891fc423574c52f0489 (patch) | |
tree | 5e6ba3fc68e088757943d3032c385dd071aefecd /Tests/RunCMake/find_dependency | |
parent | 5fbda0f572f4b698441917e438187b64408d76d5 (diff) | |
download | CMake-fb9a3d0c7da7dd581d378891fc423574c52f0489.zip CMake-fb9a3d0c7da7dd581d378891fc423574c52f0489.tar.gz CMake-fb9a3d0c7da7dd581d378891fc423574c52f0489.tar.bz2 |
find_dependency: Avoid repeating identical dependency searches
Since commit 37da6af17d (find_dependency: Always search dependencies,
2019-03-29, v3.15.0-rc1~301^2) we search for a package every time it is
encountered in the transitive dependency graph traversal, even if it has
been found before. This was done in case a new visit to a given package
requests different components than a previous visit. However, it also
causes a lot of repeat processing that is unnecessary in the common case
that all calls share the same set of components (often none).
Restore the logic to avoid repeating the search for an already-found
package. Handle differences in components by de-duplicating based on
the complete `find_package` call arguments.
Fixes: #23685
Diffstat (limited to 'Tests/RunCMake/find_dependency')
-rw-r--r-- | Tests/RunCMake/find_dependency/transitive-stdout.txt | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/Tests/RunCMake/find_dependency/transitive-stdout.txt b/Tests/RunCMake/find_dependency/transitive-stdout.txt index 0f5b366..6fe40e9 100644 --- a/Tests/RunCMake/find_dependency/transitive-stdout.txt +++ b/Tests/RunCMake/find_dependency/transitive-stdout.txt @@ -4,11 +4,6 @@ -- Loading B with components: 'B1' -- Loading A with components: '' -- Loading C with components: '' --- Loading A with components: '' -- Loading D with components: '' --- Loading A with components: 'A1' -- Loading B with components: '' --- Loading A with components: '' --- Loading C with components: '' --- Loading A with components: '' -- end |