summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/find_package
diff options
context:
space:
mode:
authorChuck Atkins <chuck.atkins@kitware.com>2017-08-02 16:03:52 (GMT)
committerChuck Atkins <chuck.atkins@kitware.com>2017-08-02 16:03:52 (GMT)
commit4a207116908c20caba4969120b1148adff391348 (patch)
tree6a8ea24b0bed1c0b878772e51b9d1d051cbf8f29 /Tests/RunCMake/find_package
parent9722ff5a6f1f2222b821206bb6bfa305ab9c0439 (diff)
downloadCMake-4a207116908c20caba4969120b1148adff391348.zip
CMake-4a207116908c20caba4969120b1148adff391348.tar.gz
CMake-4a207116908c20caba4969120b1148adff391348.tar.bz2
find_package: Split PACKAGE_ROOT tests to work with smaller regex
Diffstat (limited to 'Tests/RunCMake/find_package')
-rw-r--r--Tests/RunCMake/find_package/PackageRoot-stderr.txt700
-rw-r--r--Tests/RunCMake/find_package/PackageRoot.cmake150
-rw-r--r--Tests/RunCMake/find_package/PackageRootNestedConfig-stderr.txt298
-rw-r--r--Tests/RunCMake/find_package/PackageRootNestedConfig.cmake135
-rw-r--r--Tests/RunCMake/find_package/PackageRootNestedModule-stderr.txt298
-rw-r--r--Tests/RunCMake/find_package/PackageRootNestedModule.cmake135
-rw-r--r--Tests/RunCMake/find_package/RunCMakeTest.cmake2
7 files changed, 872 insertions, 846 deletions
diff --git a/Tests/RunCMake/find_package/PackageRoot-stderr.txt b/Tests/RunCMake/find_package/PackageRoot-stderr.txt
index ee1c387..d97c029 100644
--- a/Tests/RunCMake/find_package/PackageRoot-stderr.txt
+++ b/Tests/RunCMake/find_package/PackageRoot-stderr.txt
@@ -1,735 +1,43 @@
----------
Foo_ROOT :
ENV{Foo_ROOT} :
-Bar_DIR :.*/PackageRoot
-Bar_ROOT :
-ENV{Bar_ROOT} :
-find_package(Foo)
+find_package\(Foo\)
FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND
FOO_TEST_FILE_ZOT :FOO_TEST_FILE_ZOT-NOTFOUND
FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND
FOO_TEST_PATH_ZOT :FOO_TEST_PATH_ZOT-NOTFOUND
FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND
-find_package(Foo COMPONENTS BarModule)
-FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND
-FOO_TEST_FILE_ZOT :FOO_TEST_FILE_ZOT-NOTFOUND
-FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND
-FOO_TEST_PATH_ZOT :FOO_TEST_PATH_ZOT-NOTFOUND
-FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND
-BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
-BAR_TEST_FILE_FOO :BAR_TEST_FILE_FOO-NOTFOUND
-BAR_TEST_FILE_BAR :BAR_TEST_FILE_BAR-NOTFOUND
-BAR_TEST_FILE_ZOT :BAR_TEST_FILE_ZOT-NOTFOUND
-BAR_TEST_PATH_FOO :BAR_TEST_PATH_FOO-NOTFOUND
-BAR_TEST_PATH_BAR :BAR_TEST_PATH_BAR-NOTFOUND
-BAR_TEST_PATH_ZOT :BAR_TEST_PATH_ZOT-NOTFOUND
-BAR_TEST_PROG_FOO :BAR_TEST_PROG_FOO-NOTFOUND
-BAR_TEST_PROG_BAR :BAR_TEST_PROG_BAR-NOTFOUND
-
-find_package(Foo COMPONENTS BarConfig)
-FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND
-FOO_TEST_FILE_ZOT :FOO_TEST_FILE_ZOT-NOTFOUND
-FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND
-FOO_TEST_PATH_ZOT :FOO_TEST_PATH_ZOT-NOTFOUND
-FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND
-BAR_CMAKE_FILE :.*/PackageRoot/BarConfig.cmake
-BAR_TEST_FILE_FOO :BAR_TEST_FILE_FOO-NOTFOUND
-BAR_TEST_FILE_BAR :BAR_TEST_FILE_BAR-NOTFOUND
-BAR_TEST_FILE_ZOT :BAR_TEST_FILE_ZOT-NOTFOUND
-BAR_TEST_PATH_FOO :BAR_TEST_PATH_FOO-NOTFOUND
-BAR_TEST_PATH_BAR :BAR_TEST_PATH_BAR-NOTFOUND
-BAR_TEST_PATH_ZOT :BAR_TEST_PATH_ZOT-NOTFOUND
-BAR_TEST_PROG_FOO :BAR_TEST_PROG_FOO-NOTFOUND
-BAR_TEST_PROG_BAR :BAR_TEST_PROG_BAR-NOTFOUND
-
-----------
-Foo_ROOT :.*/PackageRoot/foo/cmake_root
-ENV{Foo_ROOT} :
-Bar_DIR :
-Bar_ROOT :
-ENV{Bar_ROOT} :
-
-find_package(Foo)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-
-find_package(Foo COMPONENTS BarModule)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/foo/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/foo/cmake_root/bin/bar.exe
-
-find_package(Foo COMPONENTS BarConfig)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/foo/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/foo/cmake_root/bin/bar.exe
-
-----------
-Foo_ROOT :
-ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root
-Bar_DIR :
-Bar_ROOT :
-ENV{Bar_ROOT} :
-
-find_package(Foo)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/env_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/env_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-
-find_package(Foo COMPONENTS BarModule)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/env_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/env_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/foo/env_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/env_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/foo/env_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/env_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/foo/env_root/bin/bar.exe
-
-find_package(Foo COMPONENTS BarConfig)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/env_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/env_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/foo/env_root/cmake/BarConfig.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/foo/env_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/env_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/foo/env_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/env_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/foo/env_root/bin/bar.exe
-
-----------
-Foo_ROOT :.*/PackageRoot/foo/cmake_root
-ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root
-Bar_DIR :
-Bar_ROOT :
-ENV{Bar_ROOT} :
-
-find_package(Foo)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-
-find_package(Foo COMPONENTS BarModule)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/foo/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/foo/cmake_root/bin/bar.exe
-
-find_package(Foo COMPONENTS BarConfig)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/foo/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/foo/cmake_root/bin/bar.exe
-
-----------
-Foo_ROOT :
-ENV{Foo_ROOT} :
-Bar_DIR :.*/PackageRoot
-Bar_ROOT :.*/PackageRoot/bar/cmake_root
-ENV{Bar_ROOT} :
-
-find_package(Foo)
-FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND
-FOO_TEST_FILE_ZOT :FOO_TEST_FILE_ZOT-NOTFOUND
-FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND
-FOO_TEST_PATH_ZOT :FOO_TEST_PATH_ZOT-NOTFOUND
-FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND
-
-find_package(Foo COMPONENTS BarModule)
-FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND
-FOO_TEST_FILE_ZOT :FOO_TEST_FILE_ZOT-NOTFOUND
-FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND
-FOO_TEST_PATH_ZOT :FOO_TEST_PATH_ZOT-NOTFOUND
-FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND
-BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
-BAR_TEST_FILE_FOO :BAR_TEST_FILE_FOO-NOTFOUND
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :BAR_TEST_PATH_FOO-NOTFOUND
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
-BAR_TEST_PROG_FOO :BAR_TEST_PROG_FOO-NOTFOUND
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
-
-find_package(Foo COMPONENTS BarConfig)
-FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND
-FOO_TEST_FILE_ZOT :FOO_TEST_FILE_ZOT-NOTFOUND
-FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND
-FOO_TEST_PATH_ZOT :FOO_TEST_PATH_ZOT-NOTFOUND
-FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND
-BAR_CMAKE_FILE :.*/PackageRoot/BarConfig.cmake
-BAR_TEST_FILE_FOO :BAR_TEST_FILE_FOO-NOTFOUND
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :BAR_TEST_PATH_FOO-NOTFOUND
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
-BAR_TEST_PROG_FOO :BAR_TEST_PROG_FOO-NOTFOUND
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
-
-----------
-Foo_ROOT :
-ENV{Foo_ROOT} :
-Bar_DIR :.*/PackageRoot
-Bar_ROOT :
-ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
-
-find_package(Foo)
-FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND
-FOO_TEST_FILE_ZOT :FOO_TEST_FILE_ZOT-NOTFOUND
-FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND
-FOO_TEST_PATH_ZOT :FOO_TEST_PATH_ZOT-NOTFOUND
-FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND
-
-find_package(Foo COMPONENTS BarModule)
-FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND
-FOO_TEST_FILE_ZOT :FOO_TEST_FILE_ZOT-NOTFOUND
-FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND
-FOO_TEST_PATH_ZOT :FOO_TEST_PATH_ZOT-NOTFOUND
-FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND
-BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
-BAR_TEST_FILE_FOO :BAR_TEST_FILE_FOO-NOTFOUND
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/env_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :BAR_TEST_PATH_FOO-NOTFOUND
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/env_root/include/zot
-BAR_TEST_PROG_FOO :BAR_TEST_PROG_FOO-NOTFOUND
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe
-
-find_package(Foo COMPONENTS BarConfig)
-FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND
-FOO_TEST_FILE_ZOT :FOO_TEST_FILE_ZOT-NOTFOUND
-FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND
-FOO_TEST_PATH_ZOT :FOO_TEST_PATH_ZOT-NOTFOUND
-FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND
-BAR_CMAKE_FILE :.*/PackageRoot/BarConfig.cmake
-BAR_TEST_FILE_FOO :BAR_TEST_FILE_FOO-NOTFOUND
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/env_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :BAR_TEST_PATH_FOO-NOTFOUND
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/env_root/include/zot
-BAR_TEST_PROG_FOO :BAR_TEST_PROG_FOO-NOTFOUND
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe
-
-----------
-Foo_ROOT :
-ENV{Foo_ROOT} :
-Bar_DIR :.*/PackageRoot
-Bar_ROOT :.*/PackageRoot/bar/cmake_root
-ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
-
-find_package(Foo)
-FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND
-FOO_TEST_FILE_ZOT :FOO_TEST_FILE_ZOT-NOTFOUND
-FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND
-FOO_TEST_PATH_ZOT :FOO_TEST_PATH_ZOT-NOTFOUND
-FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND
-
-find_package(Foo COMPONENTS BarModule)
-FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND
-FOO_TEST_FILE_ZOT :FOO_TEST_FILE_ZOT-NOTFOUND
-FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND
-FOO_TEST_PATH_ZOT :FOO_TEST_PATH_ZOT-NOTFOUND
-FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND
-BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
-BAR_TEST_FILE_FOO :BAR_TEST_FILE_FOO-NOTFOUND
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :BAR_TEST_PATH_FOO-NOTFOUND
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
-BAR_TEST_PROG_FOO :BAR_TEST_PROG_FOO-NOTFOUND
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
-
-find_package(Foo COMPONENTS BarConfig)
-FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND
-FOO_TEST_FILE_ZOT :FOO_TEST_FILE_ZOT-NOTFOUND
-FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND
-FOO_TEST_PATH_ZOT :FOO_TEST_PATH_ZOT-NOTFOUND
-FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND
-BAR_CMAKE_FILE :.*/PackageRoot/BarConfig.cmake
-BAR_TEST_FILE_FOO :BAR_TEST_FILE_FOO-NOTFOUND
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :BAR_TEST_PATH_FOO-NOTFOUND
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
-BAR_TEST_PROG_FOO :BAR_TEST_PROG_FOO-NOTFOUND
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
-
-----------
-Foo_ROOT :.*/PackageRoot/foo/cmake_root
-ENV{Foo_ROOT} :
-Bar_DIR :
-Bar_ROOT :.*/PackageRoot/bar/cmake_root
-ENV{Bar_ROOT} :
-
-find_package(Foo)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-
-find_package(Foo COMPONENTS BarModule)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
-
-find_package(Foo COMPONENTS BarConfig)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
-
-----------
-Foo_ROOT :
-ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root
-Bar_DIR :
-Bar_ROOT :.*/PackageRoot/bar/cmake_root
-ENV{Bar_ROOT} :
-
-find_package(Foo)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/env_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/env_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-
-find_package(Foo COMPONENTS BarModule)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/env_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/env_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
-
-find_package(Foo COMPONENTS BarConfig)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/env_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/env_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/foo/env_root/cmake/BarConfig.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
-
-----------
-Foo_ROOT :.*/PackageRoot/foo/cmake_root
-ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root
-Bar_DIR :
-Bar_ROOT :.*/PackageRoot/bar/cmake_root
-ENV{Bar_ROOT} :
-
-find_package(Foo)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-
-find_package(Foo COMPONENTS BarModule)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
-
-find_package(Foo COMPONENTS BarConfig)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
-
-----------
-Foo_ROOT :.*/PackageRoot/foo/cmake_root
-ENV{Foo_ROOT} :
-Bar_DIR :
-Bar_ROOT :
-ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
-
-find_package(Foo)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-
-find_package(Foo COMPONENTS BarModule)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/env_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/env_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe
-
-find_package(Foo COMPONENTS BarConfig)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/env_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/env_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe
-
-----------
-Foo_ROOT :
-ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root
-Bar_DIR :
-Bar_ROOT :
-ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
-
-find_package(Foo)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/env_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/env_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-
-find_package(Foo COMPONENTS BarModule)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/env_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/env_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/env_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/env_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe
-
-find_package(Foo COMPONENTS BarConfig)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/env_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/env_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/foo/env_root/cmake/BarConfig.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/env_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/env_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe
-
-----------
-Foo_ROOT :.*/PackageRoot/foo/cmake_root
-ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root
-Bar_DIR :
-Bar_ROOT :
-ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
-
-find_package(Foo)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-
-find_package(Foo COMPONENTS BarModule)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/env_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/env_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe
-
-find_package(Foo COMPONENTS BarConfig)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/env_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/env_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe
-
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :
-Bar_DIR :
-Bar_ROOT :.*/PackageRoot/bar/cmake_root
-ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
-
-find_package(Foo)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-
-find_package(Foo COMPONENTS BarModule)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
-find_package(Foo COMPONENTS BarConfig)
+find_package\(Foo\)
FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
----------
Foo_ROOT :
ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root
-Bar_DIR :
-Bar_ROOT :.*/PackageRoot/bar/cmake_root
-ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
-find_package(Foo)
+find_package\(Foo\)
FOO_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/env_root/include/zot/zot.h
FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/env_root/include/zot
FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-find_package(Foo COMPONENTS BarModule)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/env_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/env_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
-
-find_package(Foo COMPONENTS BarConfig)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/env_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/env_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/foo/env_root/cmake/BarConfig.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
-
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root
-Bar_DIR :
-Bar_ROOT :.*/PackageRoot/bar/cmake_root
-ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
-
-find_package(Foo)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-
-find_package(Foo COMPONENTS BarModule)
-FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
-FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
-FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
-find_package(Foo COMPONENTS BarConfig)
+find_package\(Foo\)
FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
-BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
-BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
-BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
-BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
-BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
-BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
-BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
-BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
diff --git a/Tests/RunCMake/find_package/PackageRoot.cmake b/Tests/RunCMake/find_package/PackageRoot.cmake
index c691ff0..39551c4 100644
--- a/Tests/RunCMake/find_package/PackageRoot.cmake
+++ b/Tests/RunCMake/find_package/PackageRoot.cmake
@@ -5,55 +5,24 @@ set(PackageRoot_BASE ${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot)
macro(CleanUpPackageRootTest)
unset(Foo_ROOT)
unset(ENV{Foo_ROOT})
- unset(Bar_DIR)
- unset(BAR_CMAKE_FILE)
- unset(Bar_ROOT)
- unset(ENV{Bar_ROOT})
unset(FOO_TEST_FILE_FOO)
unset(FOO_TEST_FILE_ZOT)
unset(FOO_TEST_PATH_FOO)
unset(FOO_TEST_PATH_ZOT)
unset(FOO_TEST_PROG_FOO)
- unset(BAR_TEST_FILE_FOO)
- unset(BAR_TEST_FILE_BAR)
- unset(BAR_TEST_FILE_ZOT)
- unset(BAR_TEST_PATH_FOO)
- unset(BAR_TEST_PATH_BAR)
- unset(BAR_TEST_PATH_ZOT)
- unset(BAR_TEST_PROG_FOO)
- unset(BAR_TEST_PROG_BAR)
- unset(Bar_DIR CACHE)
- unset(BAR_CMAKE_FILE CACHE)
unset(FOO_TEST_FILE_FOO CACHE)
unset(FOO_TEST_FILE_ZOT CACHE)
unset(FOO_TEST_PATH_FOO CACHE)
unset(FOO_TEST_PATH_ZOT CACHE)
unset(FOO_TEST_PROG_FOO CACHE)
- unset(BAR_TEST_FILE_FOO CACHE)
- unset(BAR_TEST_FILE_BAR CACHE)
- unset(BAR_TEST_FILE_ZOT CACHE)
- unset(BAR_TEST_PATH_FOO CACHE)
- unset(BAR_TEST_PATH_BAR CACHE)
- unset(BAR_TEST_PATH_ZOT CACHE)
- unset(BAR_TEST_PROG_FOO CACHE)
- unset(BAR_TEST_PROG_BAR CACHE)
endmacro()
macro(RunPackageRootTest)
message("----------")
message("Foo_ROOT :${Foo_ROOT}")
message("ENV{Foo_ROOT} :$ENV{Foo_ROOT}")
- message("Bar_DIR :${Bar_DIR}")
- message("Bar_ROOT :${Bar_ROOT}")
- message("ENV{Bar_ROOT} :$ENV{Bar_ROOT}")
message("")
- set(orig_bar_dir ${Bar_DIR})
- set(orig_foo_cmake_root ${Foo_ROOT})
- set(orig_foo_env_root $ENV{Foo_ROOT})
- set(orig_bar_cmake_root ${Bar_ROOT})
- set(orig_bar_env_root $ENV{Bar_ROOT})
-
find_package(Foo)
message("find_package(Foo)")
message("FOO_TEST_FILE_FOO :${FOO_TEST_FILE_FOO}")
@@ -63,135 +32,16 @@ macro(RunPackageRootTest)
message("FOO_TEST_PROG_FOO :${FOO_TEST_PROG_FOO}")
CleanUpPackageRootTest()
message("")
-
- set(Foo_ROOT ${orig_foo_cmake_root})
- set(ENV{Foo_ROOT} ${orig_foo_env_root})
- set(Bar_ROOT ${orig_bar_cmake_root})
- set(ENV{Bar_ROOT} ${orig_bar_env_root})
-
- find_package(Foo COMPONENTS BarModule)
- message("find_package(Foo COMPONENTS BarModule)")
- message("FOO_TEST_FILE_FOO :${FOO_TEST_FILE_FOO}")
- message("FOO_TEST_FILE_ZOT :${FOO_TEST_FILE_ZOT}")
- message("FOO_TEST_PATH_FOO :${FOO_TEST_PATH_FOO}")
- message("FOO_TEST_PATH_ZOT :${FOO_TEST_PATH_ZOT}")
- message("FOO_TEST_PROG_FOO :${FOO_TEST_PROG_FOO}")
- message("BAR_CMAKE_FILE :${BAR_CMAKE_FILE}")
- message("BAR_TEST_FILE_FOO :${BAR_TEST_FILE_FOO}")
- message("BAR_TEST_FILE_BAR :${BAR_TEST_FILE_BAR}")
- message("BAR_TEST_FILE_ZOT :${BAR_TEST_FILE_ZOT}")
- message("BAR_TEST_PATH_FOO :${BAR_TEST_PATH_FOO}")
- message("BAR_TEST_PATH_BAR :${BAR_TEST_PATH_BAR}")
- message("BAR_TEST_PATH_ZOT :${BAR_TEST_PATH_ZOT}")
- message("BAR_TEST_PROG_FOO :${BAR_TEST_PROG_FOO}")
- message("BAR_TEST_PROG_BAR :${BAR_TEST_PROG_BAR}")
- CleanUpPackageRootTest()
- message("")
-
- set(Bar_DIR ${orig_bar_dir})
- set(Foo_ROOT ${orig_foo_cmake_root})
- set(ENV{Foo_ROOT} ${orig_foo_env_root})
- set(Bar_ROOT ${orig_bar_cmake_root})
- set(ENV{Bar_ROOT} ${orig_bar_env_root})
-
- find_package(Foo COMPONENTS BarConfig)
- message("find_package(Foo COMPONENTS BarConfig)")
- message("FOO_TEST_FILE_FOO :${FOO_TEST_FILE_FOO}")
- message("FOO_TEST_FILE_ZOT :${FOO_TEST_FILE_ZOT}")
- message("FOO_TEST_PATH_FOO :${FOO_TEST_PATH_FOO}")
- message("FOO_TEST_PATH_ZOT :${FOO_TEST_PATH_ZOT}")
- message("FOO_TEST_PROG_FOO :${FOO_TEST_PROG_FOO}")
- message("BAR_CMAKE_FILE :${BAR_CMAKE_FILE}")
- message("BAR_TEST_FILE_FOO :${BAR_TEST_FILE_FOO}")
- message("BAR_TEST_FILE_BAR :${BAR_TEST_FILE_BAR}")
- message("BAR_TEST_FILE_ZOT :${BAR_TEST_FILE_ZOT}")
- message("BAR_TEST_PATH_FOO :${BAR_TEST_PATH_FOO}")
- message("BAR_TEST_PATH_BAR :${BAR_TEST_PATH_BAR}")
- message("BAR_TEST_PATH_ZOT :${BAR_TEST_PATH_ZOT}")
- message("BAR_TEST_PROG_FOO :${BAR_TEST_PROG_FOO}")
- message("BAR_TEST_PROG_BAR :${BAR_TEST_PROG_BAR}")
- CleanUpPackageRootTest()
- message("")
-
- unset(orig_bar_dir)
- unset(orig_foo_cmake_root)
- unset(orig_foo_env_root)
- unset(orig_bar_cmake_root)
- unset(orig_bar_env_root)
endmacro()
-set(Bar_DIR ${PackageRoot_BASE})
-RunPackageRootTest()
-
-set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
-RunPackageRootTest()
-
-set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/env_root)
-RunPackageRootTest()
-
-set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
-set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/env_root)
-RunPackageRootTest()
-
-##
-
-set(Bar_DIR ${PackageRoot_BASE})
-set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
-RunPackageRootTest()
-
-set(Bar_DIR ${PackageRoot_BASE})
-set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
-RunPackageRootTest()
-
-set(Bar_DIR ${PackageRoot_BASE})
-set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
-set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
-RunPackageRootTest()
-
-##
-
-set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
-set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
-RunPackageRootTest()
-
-set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/env_root)
-set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
-RunPackageRootTest()
-
-set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
-set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/env_root)
-set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
-RunPackageRootTest()
-
-##
-
-set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
-set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
RunPackageRootTest()
-set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/env_root)
-set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
-RunPackageRootTest()
-
-set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
-set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/env_root)
-set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
-RunPackageRootTest()
-
-##
-
set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
-set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
-set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
RunPackageRootTest()
set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/env_root)
-set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
-set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
RunPackageRootTest()
set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/env_root)
-set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
-set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
RunPackageRootTest()
diff --git a/Tests/RunCMake/find_package/PackageRootNestedConfig-stderr.txt b/Tests/RunCMake/find_package/PackageRootNestedConfig-stderr.txt
new file mode 100644
index 0000000..79266c3
--- /dev/null
+++ b/Tests/RunCMake/find_package/PackageRootNestedConfig-stderr.txt
@@ -0,0 +1,298 @@
+----------
+Foo_ROOT :
+ENV{Foo_ROOT} :
+Bar_DIR :
+Bar_ROOT :
+ENV{Bar_ROOT} :
+
+find_package\(Foo COMPONENTS BarConfig\)
+FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND
+FOO_TEST_FILE_ZOT :FOO_TEST_FILE_ZOT-NOTFOUND
+FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND
+FOO_TEST_PATH_ZOT :FOO_TEST_PATH_ZOT-NOTFOUND
+FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND
+BAR_CMAKE_FILE :
+BAR_TEST_FILE_FOO :
+BAR_TEST_FILE_BAR :
+BAR_TEST_FILE_ZOT :
+BAR_TEST_PATH_FOO :
+BAR_TEST_PATH_BAR :
+BAR_TEST_PATH_ZOT :
+BAR_TEST_PROG_FOO :
+BAR_TEST_PROG_BAR :
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :
+Bar_DIR :
+Bar_ROOT :
+ENV{Bar_ROOT} :
+
+find_package\(Foo COMPONENTS BarConfig\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/foo/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/foo/cmake_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :
+Bar_DIR :
+Bar_ROOT :.*/PackageRoot/bar/cmake_root
+ENV{Bar_ROOT} :
+
+find_package\(Foo COMPONENTS BarConfig\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :
+Bar_DIR :
+Bar_ROOT :
+ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
+
+find_package\(Foo COMPONENTS BarConfig\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/env_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/env_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :
+Bar_DIR :
+Bar_ROOT :.*/PackageRoot/bar/cmake_root
+ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
+
+find_package\(Foo COMPONENTS BarConfig\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
+Bar_DIR :
+Bar_ROOT :
+ENV{Bar_ROOT} :
+
+find_package\(Foo COMPONENTS BarConfig\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/foo/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/foo/cmake_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
+Bar_DIR :
+Bar_ROOT :.*/PackageRoot/bar/cmake_root
+ENV{Bar_ROOT} :
+
+find_package\(Foo COMPONENTS BarConfig\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
+Bar_DIR :
+Bar_ROOT :
+ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
+
+find_package\(Foo COMPONENTS BarConfig\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/env_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/env_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
+Bar_DIR :
+Bar_ROOT :.*/PackageRoot/bar/cmake_root
+ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
+
+find_package\(Foo COMPONENTS BarConfig\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
+Bar_DIR :
+Bar_ROOT :
+ENV{Bar_ROOT} :
+
+find_package\(Foo COMPONENTS BarConfig\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/foo/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/foo/cmake_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
+Bar_DIR :
+Bar_ROOT :.*/PackageRoot/bar/cmake_root
+ENV{Bar_ROOT} :
+
+find_package\(Foo COMPONENTS BarConfig\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
+Bar_DIR :
+Bar_ROOT :
+ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
+
+find_package\(Foo COMPONENTS BarConfig\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/env_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/env_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
+Bar_DIR :
+Bar_ROOT :.*/PackageRoot/bar/cmake_root
+ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
+
+find_package\(Foo COMPONENTS BarConfig\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/foo/cmake_root/cmake/BarConfig.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
diff --git a/Tests/RunCMake/find_package/PackageRootNestedConfig.cmake b/Tests/RunCMake/find_package/PackageRootNestedConfig.cmake
new file mode 100644
index 0000000..571739d
--- /dev/null
+++ b/Tests/RunCMake/find_package/PackageRootNestedConfig.cmake
@@ -0,0 +1,135 @@
+cmake_policy(SET CMP0057 NEW)
+list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot)
+set(PackageRoot_BASE ${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot)
+
+macro(CleanUpPackageRootTest)
+ unset(Foo_ROOT)
+ unset(ENV{Foo_ROOT})
+ unset(Bar_DIR)
+ unset(BAR_CMAKE_FILE)
+ unset(Bar_ROOT)
+ unset(ENV{Bar_ROOT})
+ unset(FOO_TEST_FILE_FOO)
+ unset(FOO_TEST_FILE_ZOT)
+ unset(FOO_TEST_PATH_FOO)
+ unset(FOO_TEST_PATH_ZOT)
+ unset(FOO_TEST_PROG_FOO)
+ unset(BAR_TEST_FILE_FOO)
+ unset(BAR_TEST_FILE_BAR)
+ unset(BAR_TEST_FILE_ZOT)
+ unset(BAR_TEST_PATH_FOO)
+ unset(BAR_TEST_PATH_BAR)
+ unset(BAR_TEST_PATH_ZOT)
+ unset(BAR_TEST_PROG_FOO)
+ unset(BAR_TEST_PROG_BAR)
+ unset(Bar_DIR CACHE)
+ unset(BAR_CMAKE_FILE CACHE)
+ unset(FOO_TEST_FILE_FOO CACHE)
+ unset(FOO_TEST_FILE_ZOT CACHE)
+ unset(FOO_TEST_PATH_FOO CACHE)
+ unset(FOO_TEST_PATH_ZOT CACHE)
+ unset(FOO_TEST_PROG_FOO CACHE)
+ unset(BAR_TEST_FILE_FOO CACHE)
+ unset(BAR_TEST_FILE_BAR CACHE)
+ unset(BAR_TEST_FILE_ZOT CACHE)
+ unset(BAR_TEST_PATH_FOO CACHE)
+ unset(BAR_TEST_PATH_BAR CACHE)
+ unset(BAR_TEST_PATH_ZOT CACHE)
+ unset(BAR_TEST_PROG_FOO CACHE)
+ unset(BAR_TEST_PROG_BAR CACHE)
+endmacro()
+
+macro(RunPackageRootTest)
+ message("----------")
+ message("Foo_ROOT :${Foo_ROOT}")
+ message("ENV{Foo_ROOT} :$ENV{Foo_ROOT}")
+ message("Bar_DIR :${Bar_DIR}")
+ message("Bar_ROOT :${Bar_ROOT}")
+ message("ENV{Bar_ROOT} :$ENV{Bar_ROOT}")
+ message("")
+
+ find_package(Foo COMPONENTS BarConfig)
+ message("find_package(Foo COMPONENTS BarConfig)")
+ message("FOO_TEST_FILE_FOO :${FOO_TEST_FILE_FOO}")
+ message("FOO_TEST_FILE_ZOT :${FOO_TEST_FILE_ZOT}")
+ message("FOO_TEST_PATH_FOO :${FOO_TEST_PATH_FOO}")
+ message("FOO_TEST_PATH_ZOT :${FOO_TEST_PATH_ZOT}")
+ message("FOO_TEST_PROG_FOO :${FOO_TEST_PROG_FOO}")
+ message("BAR_CMAKE_FILE :${BAR_CMAKE_FILE}")
+ message("BAR_TEST_FILE_FOO :${BAR_TEST_FILE_FOO}")
+ message("BAR_TEST_FILE_BAR :${BAR_TEST_FILE_BAR}")
+ message("BAR_TEST_FILE_ZOT :${BAR_TEST_FILE_ZOT}")
+ message("BAR_TEST_PATH_FOO :${BAR_TEST_PATH_FOO}")
+ message("BAR_TEST_PATH_BAR :${BAR_TEST_PATH_BAR}")
+ message("BAR_TEST_PATH_ZOT :${BAR_TEST_PATH_ZOT}")
+ message("BAR_TEST_PROG_FOO :${BAR_TEST_PROG_FOO}")
+ message("BAR_TEST_PROG_BAR :${BAR_TEST_PROG_BAR}")
+ CleanUpPackageRootTest()
+ message("")
+endmacro()
+
+#
+
+RunPackageRootTest()
+
+#
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
+set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
+RunPackageRootTest()
+
+#
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/cmake_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/cmake_root)
+set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/cmake_root)
+set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
+set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
+RunPackageRootTest()
+
+#
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/cmake_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/cmake_root)
+set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/cmake_root)
+set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
+set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
+RunPackageRootTest()
diff --git a/Tests/RunCMake/find_package/PackageRootNestedModule-stderr.txt b/Tests/RunCMake/find_package/PackageRootNestedModule-stderr.txt
new file mode 100644
index 0000000..57cab60
--- /dev/null
+++ b/Tests/RunCMake/find_package/PackageRootNestedModule-stderr.txt
@@ -0,0 +1,298 @@
+----------
+Foo_ROOT :
+ENV{Foo_ROOT} :
+Bar_DIR :
+Bar_ROOT :
+ENV{Bar_ROOT} :
+
+find_package\(Foo COMPONENTS BarModule\)
+FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND
+FOO_TEST_FILE_ZOT :FOO_TEST_FILE_ZOT-NOTFOUND
+FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND
+FOO_TEST_PATH_ZOT :FOO_TEST_PATH_ZOT-NOTFOUND
+FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND
+BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
+BAR_TEST_FILE_FOO :BAR_TEST_FILE_FOO-NOTFOUND
+BAR_TEST_FILE_BAR :BAR_TEST_FILE_BAR-NOTFOUND
+BAR_TEST_FILE_ZOT :BAR_TEST_FILE_ZOT-NOTFOUND
+BAR_TEST_PATH_FOO :BAR_TEST_PATH_FOO-NOTFOUND
+BAR_TEST_PATH_BAR :BAR_TEST_PATH_BAR-NOTFOUND
+BAR_TEST_PATH_ZOT :BAR_TEST_PATH_ZOT-NOTFOUND
+BAR_TEST_PROG_FOO :BAR_TEST_PROG_FOO-NOTFOUND
+BAR_TEST_PROG_BAR :BAR_TEST_PROG_BAR-NOTFOUND
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :
+Bar_DIR :
+Bar_ROOT :
+ENV{Bar_ROOT} :
+
+find_package\(Foo COMPONENTS BarModule\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/foo/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/foo/cmake_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :
+Bar_DIR :
+Bar_ROOT :.*/PackageRoot/bar/cmake_root
+ENV{Bar_ROOT} :
+
+find_package\(Foo COMPONENTS BarModule\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :
+Bar_DIR :
+Bar_ROOT :
+ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
+
+find_package\(Foo COMPONENTS BarModule\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/env_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/env_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :
+Bar_DIR :
+Bar_ROOT :.*/PackageRoot/bar/cmake_root
+ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
+
+find_package\(Foo COMPONENTS BarModule\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
+Bar_DIR :
+Bar_ROOT :
+ENV{Bar_ROOT} :
+
+find_package\(Foo COMPONENTS BarModule\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/foo/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/foo/cmake_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
+Bar_DIR :
+Bar_ROOT :.*/PackageRoot/bar/cmake_root
+ENV{Bar_ROOT} :
+
+find_package\(Foo COMPONENTS BarModule\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
+Bar_DIR :
+Bar_ROOT :
+ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
+
+find_package\(Foo COMPONENTS BarModule\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/env_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/env_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
+Bar_DIR :
+Bar_ROOT :.*/PackageRoot/bar/cmake_root
+ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
+
+find_package\(Foo COMPONENTS BarModule\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
+Bar_DIR :
+Bar_ROOT :
+ENV{Bar_ROOT} :
+
+find_package\(Foo COMPONENTS BarModule\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/foo/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/foo/cmake_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
+Bar_DIR :
+Bar_ROOT :.*/PackageRoot/bar/cmake_root
+ENV{Bar_ROOT} :
+
+find_package\(Foo COMPONENTS BarModule\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
+Bar_DIR :
+Bar_ROOT :
+ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
+
+find_package\(Foo COMPONENTS BarModule\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/env_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/env_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe
+
+----------
+Foo_ROOT :.*/PackageRoot/foo/cmake_root
+ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
+Bar_DIR :
+Bar_ROOT :.*/PackageRoot/bar/cmake_root
+ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
+
+find_package\(Foo COMPONENTS BarModule\)
+FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h
+FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot
+FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_CMAKE_FILE :.*/PackageRoot/FindBar.cmake
+BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h
+BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h
+BAR_TEST_FILE_ZOT :.*/PackageRoot/bar/cmake_root/include/zot/zot.h
+BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include
+BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include
+BAR_TEST_PATH_ZOT :.*/PackageRoot/bar/cmake_root/include/zot
+BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe
+BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe
diff --git a/Tests/RunCMake/find_package/PackageRootNestedModule.cmake b/Tests/RunCMake/find_package/PackageRootNestedModule.cmake
new file mode 100644
index 0000000..f99db59
--- /dev/null
+++ b/Tests/RunCMake/find_package/PackageRootNestedModule.cmake
@@ -0,0 +1,135 @@
+cmake_policy(SET CMP0057 NEW)
+list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot)
+set(PackageRoot_BASE ${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot)
+
+macro(CleanUpPackageRootTest)
+ unset(Foo_ROOT)
+ unset(ENV{Foo_ROOT})
+ unset(Bar_DIR)
+ unset(BAR_CMAKE_FILE)
+ unset(Bar_ROOT)
+ unset(ENV{Bar_ROOT})
+ unset(FOO_TEST_FILE_FOO)
+ unset(FOO_TEST_FILE_ZOT)
+ unset(FOO_TEST_PATH_FOO)
+ unset(FOO_TEST_PATH_ZOT)
+ unset(FOO_TEST_PROG_FOO)
+ unset(BAR_TEST_FILE_FOO)
+ unset(BAR_TEST_FILE_BAR)
+ unset(BAR_TEST_FILE_ZOT)
+ unset(BAR_TEST_PATH_FOO)
+ unset(BAR_TEST_PATH_BAR)
+ unset(BAR_TEST_PATH_ZOT)
+ unset(BAR_TEST_PROG_FOO)
+ unset(BAR_TEST_PROG_BAR)
+ unset(Bar_DIR CACHE)
+ unset(BAR_CMAKE_FILE CACHE)
+ unset(FOO_TEST_FILE_FOO CACHE)
+ unset(FOO_TEST_FILE_ZOT CACHE)
+ unset(FOO_TEST_PATH_FOO CACHE)
+ unset(FOO_TEST_PATH_ZOT CACHE)
+ unset(FOO_TEST_PROG_FOO CACHE)
+ unset(BAR_TEST_FILE_FOO CACHE)
+ unset(BAR_TEST_FILE_BAR CACHE)
+ unset(BAR_TEST_FILE_ZOT CACHE)
+ unset(BAR_TEST_PATH_FOO CACHE)
+ unset(BAR_TEST_PATH_BAR CACHE)
+ unset(BAR_TEST_PATH_ZOT CACHE)
+ unset(BAR_TEST_PROG_FOO CACHE)
+ unset(BAR_TEST_PROG_BAR CACHE)
+endmacro()
+
+macro(RunPackageRootTest)
+ message("----------")
+ message("Foo_ROOT :${Foo_ROOT}")
+ message("ENV{Foo_ROOT} :$ENV{Foo_ROOT}")
+ message("Bar_DIR :${Bar_DIR}")
+ message("Bar_ROOT :${Bar_ROOT}")
+ message("ENV{Bar_ROOT} :$ENV{Bar_ROOT}")
+ message("")
+
+ find_package(Foo COMPONENTS BarModule)
+ message("find_package(Foo COMPONENTS BarModule)")
+ message("FOO_TEST_FILE_FOO :${FOO_TEST_FILE_FOO}")
+ message("FOO_TEST_FILE_ZOT :${FOO_TEST_FILE_ZOT}")
+ message("FOO_TEST_PATH_FOO :${FOO_TEST_PATH_FOO}")
+ message("FOO_TEST_PATH_ZOT :${FOO_TEST_PATH_ZOT}")
+ message("FOO_TEST_PROG_FOO :${FOO_TEST_PROG_FOO}")
+ message("BAR_CMAKE_FILE :${BAR_CMAKE_FILE}")
+ message("BAR_TEST_FILE_FOO :${BAR_TEST_FILE_FOO}")
+ message("BAR_TEST_FILE_BAR :${BAR_TEST_FILE_BAR}")
+ message("BAR_TEST_FILE_ZOT :${BAR_TEST_FILE_ZOT}")
+ message("BAR_TEST_PATH_FOO :${BAR_TEST_PATH_FOO}")
+ message("BAR_TEST_PATH_BAR :${BAR_TEST_PATH_BAR}")
+ message("BAR_TEST_PATH_ZOT :${BAR_TEST_PATH_ZOT}")
+ message("BAR_TEST_PROG_FOO :${BAR_TEST_PROG_FOO}")
+ message("BAR_TEST_PROG_BAR :${BAR_TEST_PROG_BAR}")
+ CleanUpPackageRootTest()
+ message("")
+endmacro()
+
+#
+
+RunPackageRootTest()
+
+#
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
+set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
+RunPackageRootTest()
+
+#
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/cmake_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/cmake_root)
+set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/cmake_root)
+set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
+set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
+RunPackageRootTest()
+
+#
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/cmake_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/cmake_root)
+set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
+RunPackageRootTest()
+
+set(Foo_ROOT ${PackageRoot_BASE}/foo/cmake_root)
+set(ENV{Foo_ROOT} ${PackageRoot_BASE}/foo/cmake_root)
+set(Bar_ROOT ${PackageRoot_BASE}/bar/cmake_root)
+set(ENV{Bar_ROOT} ${PackageRoot_BASE}/bar/env_root)
+RunPackageRootTest()
diff --git a/Tests/RunCMake/find_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake
index 7875db6..d548da0 100644
--- a/Tests/RunCMake/find_package/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake
@@ -14,6 +14,8 @@ run_cmake(MissingConfigRequired)
run_cmake(MissingConfigVersion)
run_cmake(MixedModeOptions)
run_cmake(PackageRoot)
+run_cmake(PackageRootNestedConfig)
+run_cmake(PackageRootNestedModule)
run_cmake(PolicyPush)
run_cmake(PolicyPop)
run_cmake(SetFoundFALSE)