diff options
author | Brad King <brad.king@kitware.com> | 2017-07-07 12:06:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-07-07 15:43:59 (GMT) |
commit | e7730d78b44ca90aa8ee6d1f34495cd416888bce (patch) | |
tree | 08d34a6bf065300ce9ad6f9e9094d9b8cd352667 /Tests/RunCMake/find_package/VersionedA-2/VersionedAConfigVersion.cmake | |
parent | 372de3f8039f69b3a2edcf7120083ec4097f8bd3 (diff) | |
download | CMake-e7730d78b44ca90aa8ee6d1f34495cd416888bce.zip CMake-e7730d78b44ca90aa8ee6d1f34495cd416888bce.tar.gz CMake-e7730d78b44ca90aa8ee6d1f34495cd416888bce.tar.bz2 |
find_package: Restore longer message when config files were considered
Since commit v3.9.0-rc1~58^2 (find_package: shorten output for missing
package in config mode, 2017-05-09) we print only the one line
- Could NOT find Foo (missing: Foo_DIR)
when package Foo cannot be found in CONFIG mode and it is not REQUIRED.
However, in the case that package configuration files were found but not
used, this one line message leaves out important information. This can
happen when a package configuration file sets `Foo_FOUND` to `FALSE` or
when its package version file does not match the requested version.
Restore the longer message in these cases. Otherwise a seemingly valid
explicit `Foo_DIR` setting appears to be silently ignored even if it was
considered.
Fixes: #17029
Diffstat (limited to 'Tests/RunCMake/find_package/VersionedA-2/VersionedAConfigVersion.cmake')
-rw-r--r-- | Tests/RunCMake/find_package/VersionedA-2/VersionedAConfigVersion.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/RunCMake/find_package/VersionedA-2/VersionedAConfigVersion.cmake b/Tests/RunCMake/find_package/VersionedA-2/VersionedAConfigVersion.cmake new file mode 100644 index 0000000..7eb8332 --- /dev/null +++ b/Tests/RunCMake/find_package/VersionedA-2/VersionedAConfigVersion.cmake @@ -0,0 +1,4 @@ +set(PACKAGE_VERSION 2) +if("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL 2) + set(PACKAGE_VERSION_COMPATIBLE 1) +endif() |