summaryrefslogtreecommitdiffstats
path: root/Tests/Module/FindDependency/CMakeLists.txt
diff options
context:
space:
mode:
authorDamien R <9464-damienrg@users.noreply.gitlab.kitware.com>2019-03-28 23:47:23 (GMT)
committerDamien R <9464-damienrg@users.noreply.gitlab.kitware.com>2019-03-29 21:03:21 (GMT)
commit37da6af17d0d2cc8b499dc58f74866351e06c288 (patch)
treed7af06b514d0af13f072a0d05ca77ad42d085630 /Tests/Module/FindDependency/CMakeLists.txt
parent14b6cd497f0e27dc5d02d678fcab0ca1492a320b (diff)
downloadCMake-37da6af17d0d2cc8b499dc58f74866351e06c288.zip
CMake-37da6af17d0d2cc8b499dc58f74866351e06c288.tar.gz
CMake-37da6af17d0d2cc8b499dc58f74866351e06c288.tar.bz2
find_dependency: Always search dependencies
When a dependency was already found, find_dependency did not search it again. While this works in basic case, it does not when there are components as the check does not take components into account. Given the fact that there is no documentation about this optimization and that the correct implementation is not trivial as it would require changes in find_package to have the list of components already found we always search dependencies. Fix #17583.
Diffstat (limited to 'Tests/Module/FindDependency/CMakeLists.txt')
-rw-r--r--Tests/Module/FindDependency/CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/Tests/Module/FindDependency/CMakeLists.txt b/Tests/Module/FindDependency/CMakeLists.txt
index dcb998a..06d7dce 100644
--- a/Tests/Module/FindDependency/CMakeLists.txt
+++ b/Tests/Module/FindDependency/CMakeLists.txt
@@ -6,6 +6,8 @@ set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/packages")
find_package(Pack1 REQUIRED)
find_package(Pack4 4.3 EXACT REQUIRED)
+find_package(Pack7 REQUIRED)
+find_package(Pack8 REQUIRED)
add_executable(FindDependency main.cpp)
-target_link_libraries(FindDependency Pack1::Lib Pack4::Lib)
+target_link_libraries(FindDependency Pack1::Lib Pack4::Lib Pack8::Lib)