diff options
author | Brad King <brad.king@kitware.com> | 2017-07-10 14:21:12 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-07-10 14:21:23 (GMT) |
commit | 4bf96ed9b01a31e0c91e101b913fa5eb64b99432 (patch) | |
tree | 0289c477e7bb2aab422967aaf0e7da92bd7ff63d /Tests | |
parent | 9eaf0fea2824b2e0b767915dec25deed9552905a (diff) | |
parent | e7730d78b44ca90aa8ee6d1f34495cd416888bce (diff) | |
download | CMake-4bf96ed9b01a31e0c91e101b913fa5eb64b99432.zip CMake-4bf96ed9b01a31e0c91e101b913fa5eb64b99432.tar.gz CMake-4bf96ed9b01a31e0c91e101b913fa5eb64b99432.tar.bz2 |
Merge topic 'find_package-restore-considered-configs'
e7730d78 find_package: Restore longer message when config files were considered
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1032
Diffstat (limited to 'Tests')
11 files changed, 45 insertions, 1 deletions
diff --git a/Tests/RunCMake/find_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake index 72f9c4d..7875db6 100644 --- a/Tests/RunCMake/find_package/RunCMakeTest.cmake +++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake @@ -17,3 +17,5 @@ run_cmake(PackageRoot) run_cmake(PolicyPush) run_cmake(PolicyPop) run_cmake(SetFoundFALSE) +run_cmake(WrongVersion) +run_cmake(WrongVersionConfig) diff --git a/Tests/RunCMake/find_package/SetFoundFALSE-stderr.txt b/Tests/RunCMake/find_package/SetFoundFALSE-stderr.txt new file mode 100644 index 0000000..695f645 --- /dev/null +++ b/Tests/RunCMake/find_package/SetFoundFALSE-stderr.txt @@ -0,0 +1,9 @@ +CMake Warning at SetFoundFALSE.cmake:2 \(find_package\): + Found package configuration file: + + .*/Tests/RunCMake/find_package/SetFoundFALSEConfig.cmake + + but it set SetFoundFALSE_FOUND to FALSE so package "SetFoundFALSE" is + considered to be NOT FOUND. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/find_package/SetFoundFALSE-stdout.txt b/Tests/RunCMake/find_package/SetFoundFALSE-stdout.txt deleted file mode 100644 index 37e6e7e..0000000 --- a/Tests/RunCMake/find_package/SetFoundFALSE-stdout.txt +++ /dev/null @@ -1 +0,0 @@ --- Could NOT find SetFoundFALSE \(missing: SetFoundFALSE_DIR\) diff --git a/Tests/RunCMake/find_package/VersionedA-1/VersionedAConfig.cmake b/Tests/RunCMake/find_package/VersionedA-1/VersionedAConfig.cmake new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/find_package/VersionedA-1/VersionedAConfig.cmake diff --git a/Tests/RunCMake/find_package/VersionedA-1/VersionedAConfigVersion.cmake b/Tests/RunCMake/find_package/VersionedA-1/VersionedAConfigVersion.cmake new file mode 100644 index 0000000..2dbcfb2 --- /dev/null +++ b/Tests/RunCMake/find_package/VersionedA-1/VersionedAConfigVersion.cmake @@ -0,0 +1,4 @@ +set(PACKAGE_VERSION 1) +if("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL 1) + set(PACKAGE_VERSION_COMPATIBLE 1) +endif() diff --git a/Tests/RunCMake/find_package/VersionedA-2/VersionedAConfig.cmake b/Tests/RunCMake/find_package/VersionedA-2/VersionedAConfig.cmake new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/find_package/VersionedA-2/VersionedAConfig.cmake 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() diff --git a/Tests/RunCMake/find_package/WrongVersion-stderr.txt b/Tests/RunCMake/find_package/WrongVersion-stderr.txt new file mode 100644 index 0000000..ae9fc4a --- /dev/null +++ b/Tests/RunCMake/find_package/WrongVersion-stderr.txt @@ -0,0 +1,11 @@ +^CMake Warning at WrongVersion.cmake:[0-9]+ \(find_package\): + Could not find a configuration file for package "VersionedA" that is + compatible with requested version "3". + + The following configuration files were considered but not accepted: + + .*/Tests/RunCMake/find_package/VersionedA-[12]/VersionedAConfig.cmake, version: [12] + .*/Tests/RunCMake/find_package/VersionedA-[12]/VersionedAConfig.cmake, version: [12] + +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/find_package/WrongVersion.cmake b/Tests/RunCMake/find_package/WrongVersion.cmake new file mode 100644 index 0000000..5bc711f --- /dev/null +++ b/Tests/RunCMake/find_package/WrongVersion.cmake @@ -0,0 +1,2 @@ +set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}) +find_package(VersionedA 3) diff --git a/Tests/RunCMake/find_package/WrongVersionConfig-stderr.txt b/Tests/RunCMake/find_package/WrongVersionConfig-stderr.txt new file mode 100644 index 0000000..1b84233 --- /dev/null +++ b/Tests/RunCMake/find_package/WrongVersionConfig-stderr.txt @@ -0,0 +1,11 @@ +^CMake Warning at WrongVersionConfig.cmake:[0-9]+ \(find_package\): + Could not find a configuration file for package "VersionedA" that is + compatible with requested version "3". + + The following configuration files were considered but not accepted: + + .*/Tests/RunCMake/find_package/VersionedA-[12]/VersionedAConfig.cmake, version: [12] + .*/Tests/RunCMake/find_package/VersionedA-[12]/VersionedAConfig.cmake, version: [12] + +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/find_package/WrongVersionConfig.cmake b/Tests/RunCMake/find_package/WrongVersionConfig.cmake new file mode 100644 index 0000000..5bc711f --- /dev/null +++ b/Tests/RunCMake/find_package/WrongVersionConfig.cmake @@ -0,0 +1,2 @@ +set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}) +find_package(VersionedA 3) |