summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-04-07 19:36:05 (GMT)
committerBrad King <brad.king@kitware.com>2011-04-07 19:36:05 (GMT)
commit9fc7ea4c620e849a719ea23ea6faff17f1d67ee6 (patch)
treeed9e31f58bcef7e9b56ebd2104b9ed906b3dd749 /Tests
parentc2f8a137152d9dc4cc08b156284f916561e1455c (diff)
downloadCMake-9fc7ea4c620e849a719ea23ea6faff17f1d67ee6.zip
CMake-9fc7ea4c620e849a719ea23ea6faff17f1d67ee6.tar.gz
CMake-9fc7ea4c620e849a719ea23ea6faff17f1d67ee6.tar.bz2
find_package: Forward component list for recursive calls in modules
Some find modules call find_package recursively to locate a package configuration file for the package instead of searching for individual pieces. Commit 79e9b755 (Help recursive find_package calls in modules, 2008-10-03) taught find_package to forward the version number and EXACT arguments through the recursive call automatically. Do the same for the component list.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/FindPackageTest/CMakeLists.txt2
-rw-r--r--Tests/FindPackageTest/lib/RecursiveA/recursivea-config.cmake3
2 files changed, 4 insertions, 1 deletions
diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt
index f420f4b..d4984d7 100644
--- a/Tests/FindPackageTest/CMakeLists.txt
+++ b/Tests/FindPackageTest/CMakeLists.txt
@@ -105,7 +105,7 @@ FIND_PACKAGE(wibbleA NAMES wibble PATHS B)
FIND_PACKAGE(wibbleB NAMES wibble HINTS B)
# Look for package with recursive find-modules.
-FIND_PACKAGE(RecursiveA)
+FIND_PACKAGE(RecursiveA COMPONENTS A)
FIND_PACKAGE(RecursiveB 2)
FIND_PACKAGE(RecursiveC 3.1 EXACT)
diff --git a/Tests/FindPackageTest/lib/RecursiveA/recursivea-config.cmake b/Tests/FindPackageTest/lib/RecursiveA/recursivea-config.cmake
index deffa57..eff4d4f 100644
--- a/Tests/FindPackageTest/lib/RecursiveA/recursivea-config.cmake
+++ b/Tests/FindPackageTest/lib/RecursiveA/recursivea-config.cmake
@@ -1 +1,4 @@
# Test config file.
+if(NOT "${RecursiveA_FIND_COMPONENTS}" STREQUAL "A")
+ message(FATAL_ERROR "find_package(RecursiveA NO_MODULE) did not forward components")
+endif()