diff options
author | Brad King <brad.king@kitware.com> | 2018-03-15 17:22:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-03-16 13:19:28 (GMT) |
commit | eb35d8884b4cf9f4f96482b1bf6017511fdcdda3 (patch) | |
tree | 2634d94df58551aa9b7c46586d0102e5176033a7 /Tests/RunCMake/find_package/CMP0074-WARN-stderr.txt | |
parent | 018946aaafc9ada6852d55cb8034faf0f4c1afbc (diff) | |
download | CMake-eb35d8884b4cf9f4f96482b1bf6017511fdcdda3.zip CMake-eb35d8884b4cf9f4f96482b1bf6017511fdcdda3.tar.gz CMake-eb35d8884b4cf9f4f96482b1bf6017511fdcdda3.tar.bz2 |
find_package: Use PackageName_ROOT variables as search prefixes
This feature was originally added by commit v3.9.0-rc1~71^2~2 (find_*:
Add a new PackageRoot search path group, 2017-05-03) and documented by
commit v3.9.0-rc1~71^2 (find_*: Add docs for PackageRoot search path
group, 2017-05-03). However, we had to disable the feature and remove
the documentation in commit v3.9.1~2^2 (find_*: Disable the PACKAGE_ROOT
search path group for CMake 3.9, 2017-08-08) due to breaking projects
that used `PackageName_ROOT` variables themselves.
Add policy `CMP0074` to restore the `PackageName_ROOT` variable behavior
in a compatible way. Also revise the stack of root paths to store the
paths themselves rather than the package names. This way the policy can
be considered at the `find_package` call site instead of individual
`find_` calls inside a find module.
Co-Author: Chuck Atkins <chuck.atkins@kitware.com>
Issue: #17144
Diffstat (limited to 'Tests/RunCMake/find_package/CMP0074-WARN-stderr.txt')
-rw-r--r-- | Tests/RunCMake/find_package/CMP0074-WARN-stderr.txt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Tests/RunCMake/find_package/CMP0074-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0074-WARN-stderr.txt new file mode 100644 index 0000000..c762d92 --- /dev/null +++ b/Tests/RunCMake/find_package/CMP0074-WARN-stderr.txt @@ -0,0 +1,28 @@ +---------- +Foo_ROOT :<base>/foo/cmake_root +ENV{Foo_ROOT} :<base>/foo/env_root ++ +CMake Warning \(dev\) at CMP0074-common.cmake:[0-9]+ \(find_package\): + Policy CMP0074 is not set: find_package uses PackageName_ROOT variables. + Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy + command to set the policy and suppress this warning. + + CMake variable Foo_ROOT is set. + + Environment variable Foo_ROOT is set. + + For compatibility, CMake is ignoring the variable. +Call Stack \(most recent call first\): + CMP0074-common.cmake:[0-9]+ \(RunPackageRootTest\) + CMP0074-WARN.cmake:[0-9]+ \(include\) + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. ++ +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 + +---------- |