Tests: Simplify RunCMake.find_package PackageRoot case regexes

This commit is contained in:
Brad King 2017-08-08 07:59:52 -04:00
parent 4a20711690
commit e574bce15b
6 changed files with 480 additions and 465 deletions

View File

@ -10,34 +10,34 @@ FOO_TEST_PATH_ZOT :FOO_TEST_PATH_ZOT-NOTFOUND
FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_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
FOO_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
----------
Foo_ROOT :
ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root
ENV{Foo_ROOT} :<base>/foo/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
FOO_TEST_FILE_FOO :<base>/foo/env_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/env_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/env_root/include
FOO_TEST_PATH_ZOT :<base>/foo/env_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/env_root/bin/foo.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :<base>/foo/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
FOO_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe

View File

@ -2,6 +2,11 @@ cmake_policy(SET CMP0057 NEW)
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot)
set(PackageRoot_BASE ${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot)
function(PrintPath label path)
string(REPLACE "${PackageRoot_BASE}" "<base>" out "${path}")
message("${label}${out}")
endfunction()
macro(CleanUpPackageRootTest)
unset(Foo_ROOT)
unset(ENV{Foo_ROOT})
@ -19,17 +24,17 @@ endmacro()
macro(RunPackageRootTest)
message("----------")
message("Foo_ROOT :${Foo_ROOT}")
message("ENV{Foo_ROOT} :$ENV{Foo_ROOT}")
PrintPath("Foo_ROOT :" "${Foo_ROOT}")
PrintPath("ENV{Foo_ROOT} :" "$ENV{Foo_ROOT}")
message("")
find_package(Foo)
message("find_package(Foo)")
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}")
PrintPath("FOO_TEST_FILE_FOO :" "${FOO_TEST_FILE_FOO}")
PrintPath("FOO_TEST_FILE_ZOT :" "${FOO_TEST_FILE_ZOT}")
PrintPath("FOO_TEST_PATH_FOO :" "${FOO_TEST_PATH_FOO}")
PrintPath("FOO_TEST_PATH_ZOT :" "${FOO_TEST_PATH_ZOT}")
PrintPath("FOO_TEST_PROG_FOO :" "${FOO_TEST_PROG_FOO}")
CleanUpPackageRootTest()
message("")
endmacro()

View File

@ -22,277 +22,277 @@ BAR_TEST_PROG_FOO :
BAR_TEST_PROG_BAR :
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/foo/cmake_root/cmake/BarConfig.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/foo/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/foo/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/foo/cmake_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :
Bar_DIR :
Bar_ROOT :.*/PackageRoot/bar/cmake_root
Bar_ROOT :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/foo/cmake_root/cmake/BarConfig.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/bar/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/cmake_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :
Bar_DIR :
Bar_ROOT :
ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
ENV{Bar_ROOT} :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/foo/cmake_root/cmake/BarConfig.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/env_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/env_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/env_root/include
BAR_TEST_PATH_ZOT :<base>/bar/env_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/env_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :
Bar_DIR :
Bar_ROOT :.*/PackageRoot/bar/cmake_root
ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
Bar_ROOT :<base>/bar/cmake_root
ENV{Bar_ROOT} :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/foo/cmake_root/cmake/BarConfig.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/bar/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/cmake_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/foo/cmake_root/cmake/BarConfig.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/foo/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/foo/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/foo/cmake_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :<base>/foo/cmake_root
Bar_DIR :
Bar_ROOT :.*/PackageRoot/bar/cmake_root
Bar_ROOT :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/foo/cmake_root/cmake/BarConfig.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/bar/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/cmake_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :<base>/foo/cmake_root
Bar_DIR :
Bar_ROOT :
ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
ENV{Bar_ROOT} :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/foo/cmake_root/cmake/BarConfig.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/env_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/env_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/env_root/include
BAR_TEST_PATH_ZOT :<base>/bar/env_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/env_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :<base>/foo/cmake_root
Bar_DIR :
Bar_ROOT :.*/PackageRoot/bar/cmake_root
ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
Bar_ROOT :<base>/bar/cmake_root
ENV{Bar_ROOT} :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/foo/cmake_root/cmake/BarConfig.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/bar/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/cmake_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/foo/cmake_root/cmake/BarConfig.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/foo/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/foo/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/foo/cmake_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :<base>/foo/cmake_root
Bar_DIR :
Bar_ROOT :.*/PackageRoot/bar/cmake_root
Bar_ROOT :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/foo/cmake_root/cmake/BarConfig.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/bar/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/cmake_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :<base>/foo/cmake_root
Bar_DIR :
Bar_ROOT :
ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
ENV{Bar_ROOT} :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/foo/cmake_root/cmake/BarConfig.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/env_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/env_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/env_root/include
BAR_TEST_PATH_ZOT :<base>/bar/env_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/env_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :<base>/foo/cmake_root
Bar_DIR :
Bar_ROOT :.*/PackageRoot/bar/cmake_root
ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
Bar_ROOT :<base>/bar/cmake_root
ENV{Bar_ROOT} :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/foo/cmake_root/cmake/BarConfig.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/bar/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/cmake_root/bin/bar.exe

View File

@ -2,6 +2,11 @@ cmake_policy(SET CMP0057 NEW)
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot)
set(PackageRoot_BASE ${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot)
function(PrintPath label path)
string(REPLACE "${PackageRoot_BASE}" "<base>" out "${path}")
message("${label}${out}")
endfunction()
macro(CleanUpPackageRootTest)
unset(Foo_ROOT)
unset(ENV{Foo_ROOT})
@ -41,29 +46,29 @@ 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}")
PrintPath("Foo_ROOT :" "${Foo_ROOT}")
PrintPath("ENV{Foo_ROOT} :" "$ENV{Foo_ROOT}")
PrintPath("Bar_DIR :" "${Bar_DIR}")
PrintPath("Bar_ROOT :" "${Bar_ROOT}")
PrintPath("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}")
PrintPath("FOO_TEST_FILE_FOO :" "${FOO_TEST_FILE_FOO}")
PrintPath("FOO_TEST_FILE_ZOT :" "${FOO_TEST_FILE_ZOT}")
PrintPath("FOO_TEST_PATH_FOO :" "${FOO_TEST_PATH_FOO}")
PrintPath("FOO_TEST_PATH_ZOT :" "${FOO_TEST_PATH_ZOT}")
PrintPath("FOO_TEST_PROG_FOO :" "${FOO_TEST_PROG_FOO}")
PrintPath("BAR_CMAKE_FILE :" "${BAR_CMAKE_FILE}")
PrintPath("BAR_TEST_FILE_FOO :" "${BAR_TEST_FILE_FOO}")
PrintPath("BAR_TEST_FILE_BAR :" "${BAR_TEST_FILE_BAR}")
PrintPath("BAR_TEST_FILE_ZOT :" "${BAR_TEST_FILE_ZOT}")
PrintPath("BAR_TEST_PATH_FOO :" "${BAR_TEST_PATH_FOO}")
PrintPath("BAR_TEST_PATH_BAR :" "${BAR_TEST_PATH_BAR}")
PrintPath("BAR_TEST_PATH_ZOT :" "${BAR_TEST_PATH_ZOT}")
PrintPath("BAR_TEST_PROG_FOO :" "${BAR_TEST_PROG_FOO}")
PrintPath("BAR_TEST_PROG_BAR :" "${BAR_TEST_PROG_BAR}")
CleanUpPackageRootTest()
message("")
endmacro()

View File

@ -11,7 +11,7 @@ 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_CMAKE_FILE :<base>/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
@ -22,277 +22,277 @@ BAR_TEST_PROG_FOO :BAR_TEST_PROG_FOO-NOTFOUND
BAR_TEST_PROG_BAR :BAR_TEST_PROG_BAR-NOTFOUND
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/FindBar.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/foo/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/foo/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/foo/cmake_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :
Bar_DIR :
Bar_ROOT :.*/PackageRoot/bar/cmake_root
Bar_ROOT :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/FindBar.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/bar/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/cmake_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :
Bar_DIR :
Bar_ROOT :
ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
ENV{Bar_ROOT} :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/FindBar.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/env_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/env_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/env_root/include
BAR_TEST_PATH_ZOT :<base>/bar/env_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/env_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :
Bar_DIR :
Bar_ROOT :.*/PackageRoot/bar/cmake_root
ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
Bar_ROOT :<base>/bar/cmake_root
ENV{Bar_ROOT} :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/FindBar.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/bar/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/cmake_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/FindBar.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/foo/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/foo/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/foo/cmake_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :<base>/foo/cmake_root
Bar_DIR :
Bar_ROOT :.*/PackageRoot/bar/cmake_root
Bar_ROOT :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/FindBar.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/bar/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/cmake_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :<base>/foo/cmake_root
Bar_DIR :
Bar_ROOT :
ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
ENV{Bar_ROOT} :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/FindBar.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/env_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/env_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/env_root/include
BAR_TEST_PATH_ZOT :<base>/bar/env_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/env_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :<base>/foo/cmake_root
Bar_DIR :
Bar_ROOT :.*/PackageRoot/bar/cmake_root
ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
Bar_ROOT :<base>/bar/cmake_root
ENV{Bar_ROOT} :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/FindBar.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/bar/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/cmake_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/FindBar.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/foo/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/foo/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/foo/cmake_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :<base>/foo/cmake_root
Bar_DIR :
Bar_ROOT :.*/PackageRoot/bar/cmake_root
Bar_ROOT :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/FindBar.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/bar/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/cmake_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :<base>/foo/cmake_root
Bar_DIR :
Bar_ROOT :
ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
ENV{Bar_ROOT} :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/FindBar.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/env_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/env_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/env_root/include
BAR_TEST_PATH_ZOT :<base>/bar/env_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/env_root/bin/bar.exe
----------
Foo_ROOT :.*/PackageRoot/foo/cmake_root
ENV{Foo_ROOT} :.*/PackageRoot/foo/cmake_root
Foo_ROOT :<base>/foo/cmake_root
ENV{Foo_ROOT} :<base>/foo/cmake_root
Bar_DIR :
Bar_ROOT :.*/PackageRoot/bar/cmake_root
ENV{Bar_ROOT} :.*/PackageRoot/bar/env_root
Bar_ROOT :<base>/bar/cmake_root
ENV{Bar_ROOT} :<base>/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_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
FOO_TEST_FILE_ZOT :<base>/foo/cmake_root/include/zot/zot.h
FOO_TEST_PATH_FOO :<base>/foo/cmake_root/include
FOO_TEST_PATH_ZOT :<base>/foo/cmake_root/include/zot
FOO_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_CMAKE_FILE :<base>/FindBar.cmake
BAR_TEST_FILE_FOO :<base>/foo/cmake_root/include/foo.h
BAR_TEST_FILE_BAR :<base>/bar/cmake_root/include/bar.h
BAR_TEST_FILE_ZOT :<base>/bar/cmake_root/include/zot/zot.h
BAR_TEST_PATH_FOO :<base>/foo/cmake_root/include
BAR_TEST_PATH_BAR :<base>/bar/cmake_root/include
BAR_TEST_PATH_ZOT :<base>/bar/cmake_root/include/zot
BAR_TEST_PROG_FOO :<base>/foo/cmake_root/bin/foo.exe
BAR_TEST_PROG_BAR :<base>/bar/cmake_root/bin/bar.exe

View File

@ -2,6 +2,11 @@ cmake_policy(SET CMP0057 NEW)
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot)
set(PackageRoot_BASE ${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot)
function(PrintPath label path)
string(REPLACE "${PackageRoot_BASE}" "<base>" out "${path}")
message("${label}${out}")
endfunction()
macro(CleanUpPackageRootTest)
unset(Foo_ROOT)
unset(ENV{Foo_ROOT})
@ -41,29 +46,29 @@ 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}")
PrintPath("Foo_ROOT :" "${Foo_ROOT}")
PrintPath("ENV{Foo_ROOT} :" "$ENV{Foo_ROOT}")
PrintPath("Bar_DIR :" "${Bar_DIR}")
PrintPath("Bar_ROOT :" "${Bar_ROOT}")
PrintPath("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}")
PrintPath("FOO_TEST_FILE_FOO :" "${FOO_TEST_FILE_FOO}")
PrintPath("FOO_TEST_FILE_ZOT :" "${FOO_TEST_FILE_ZOT}")
PrintPath("FOO_TEST_PATH_FOO :" "${FOO_TEST_PATH_FOO}")
PrintPath("FOO_TEST_PATH_ZOT :" "${FOO_TEST_PATH_ZOT}")
PrintPath("FOO_TEST_PROG_FOO :" "${FOO_TEST_PROG_FOO}")
PrintPath("BAR_CMAKE_FILE :" "${BAR_CMAKE_FILE}")
PrintPath("BAR_TEST_FILE_FOO :" "${BAR_TEST_FILE_FOO}")
PrintPath("BAR_TEST_FILE_BAR :" "${BAR_TEST_FILE_BAR}")
PrintPath("BAR_TEST_FILE_ZOT :" "${BAR_TEST_FILE_ZOT}")
PrintPath("BAR_TEST_PATH_FOO :" "${BAR_TEST_PATH_FOO}")
PrintPath("BAR_TEST_PATH_BAR :" "${BAR_TEST_PATH_BAR}")
PrintPath("BAR_TEST_PATH_ZOT :" "${BAR_TEST_PATH_ZOT}")
PrintPath("BAR_TEST_PROG_FOO :" "${BAR_TEST_PROG_FOO}")
PrintPath("BAR_TEST_PROG_BAR :" "${BAR_TEST_PROG_BAR}")
CleanUpPackageRootTest()
message("")
endmacro()