summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/find_package/PackageRootNestedModule.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-08-08 15:22:17 (GMT)
committerBrad King <brad.king@kitware.com>2017-08-08 15:52:28 (GMT)
commit578d95f87d2c77498d1bbdd46bf5c1ad8095c31d (patch)
tree574f50edde4397174ee61b54ce91824212417632 /Tests/RunCMake/find_package/PackageRootNestedModule.cmake
parent4a207116908c20caba4969120b1148adff391348 (diff)
downloadCMake-578d95f87d2c77498d1bbdd46bf5c1ad8095c31d.zip
CMake-578d95f87d2c77498d1bbdd46bf5c1ad8095c31d.tar.gz
CMake-578d95f87d2c77498d1bbdd46bf5c1ad8095c31d.tar.bz2
find_*: Disable the PACKAGE_ROOT search path group for CMake 3.9
Disable the feature added by commit v3.9.0-rc1~71^2~2 (find_*: Add a new PackageRoot search path group, 2017-05-03) and remove documentation added by commit v3.9.0-rc1~71^2 (find_*: Add docs for PackageRoot search path group, 2017-05-03). Unfortunately the name `<pkg>_ROOT` may already be set by projects for their own incompatible purposes. Disable the behavior change for now to fix the regression for CMake 3.9. We can restore it later with a policy. In order to keep the implementation and tests working, add an undocumented variable we can use in the tests to enable the behavior before the policy is introduced. Fixes: #17144
Diffstat (limited to 'Tests/RunCMake/find_package/PackageRootNestedModule.cmake')
-rw-r--r--Tests/RunCMake/find_package/PackageRootNestedModule.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/RunCMake/find_package/PackageRootNestedModule.cmake b/Tests/RunCMake/find_package/PackageRootNestedModule.cmake
index f99db59..5a56c2b 100644
--- a/Tests/RunCMake/find_package/PackageRootNestedModule.cmake
+++ b/Tests/RunCMake/find_package/PackageRootNestedModule.cmake
@@ -1,3 +1,4 @@
+set(__UNDOCUMENTED_CMAKE_FIND_PACKAGE_ROOT 1)
cmake_policy(SET CMP0057 NEW)
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot)
set(PackageRoot_BASE ${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot)