diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-02-23 22:23:11 +0100 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-04-17 10:46:24 -0400 |
commit | d1a6d15bcd4df3d3e347411bd457be32275fb594 (patch) | |
tree | 0f76369cc1c8806360a8caa1a7561667ab48dcb7 /Tests/FindPackageTest | |
parent | cdc53b62c20605467334ecb80c474533e04ff26c (diff) | |
download | cmake-d1a6d15bcd4df3d3e347411bd457be32275fb594.tar.gz |
FPHSA: Always populate the ExactCase_FOUND variable (#15412).
The UPPERCASE name was inconsistent with config-packages, the
find_dependency macro, and even FPHSA itself, which expects
components to be specified with names matching ExactCase.
The FOUND_VAR was only permitted to have two possible values, and
now both are set for compatibility. Document it as obsolete, and
adjust the code for the same. Users of the variable should just
remove it.
Diffstat (limited to 'Tests/FindPackageTest')
-rw-r--r-- | Tests/FindPackageTest/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/FindPackageTest/FindSomePackage.cmake | 3 | ||||
-rw-r--r-- | Tests/FindPackageTest/FindUpperCasePackage.cmake | 3 |
3 files changed, 10 insertions, 6 deletions
diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt index f311fb9dd0..8fafa3b707 100644 --- a/Tests/FindPackageTest/CMakeLists.txt +++ b/Tests/FindPackageTest/CMakeLists.txt @@ -45,12 +45,18 @@ endif() find_package(SomePackage) if(NOT SomePackage_FOUND) - message(SEND_ERROR "SomePackage with FOUND_VAR SomePackage_FOUND not found !") + message(SEND_ERROR "SomePackage not found !") +endif() +if(NOT SOMEPACKAGE_FOUND) + message(SEND_ERROR "SomePackage compatibility name SOMEPACKAGE_FOUND not set!") endif() find_package(UpperCasePackage) +if(NOT UpperCasePackage_FOUND) + message(SEND_ERROR "UpperCasePackage not found!") +endif() if(NOT UPPERCASEPACKAGE_FOUND) - message(SEND_ERROR "UpperCasePackage with FOUND_VAR UPPERCASEPACKAGE_FOUND not found !") + message(SEND_ERROR "SomePackage compatibility name SOMEPACKAGE_FOUND not set!") endif() #----------------------------------------------------------------------------- diff --git a/Tests/FindPackageTest/FindSomePackage.cmake b/Tests/FindPackageTest/FindSomePackage.cmake index 7283d247e2..746c08776d 100644 --- a/Tests/FindPackageTest/FindSomePackage.cmake +++ b/Tests/FindPackageTest/FindSomePackage.cmake @@ -2,5 +2,4 @@ set(SOP_FOO TRUE) include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) -find_package_handle_standard_args(SomePackage REQUIRED_VARS SOP_FOO - FOUND_VAR SomePackage_FOUND ) +find_package_handle_standard_args(SomePackage REQUIRED_VARS SOP_FOO) diff --git a/Tests/FindPackageTest/FindUpperCasePackage.cmake b/Tests/FindPackageTest/FindUpperCasePackage.cmake index 425d41769a..5e349da5d0 100644 --- a/Tests/FindPackageTest/FindUpperCasePackage.cmake +++ b/Tests/FindPackageTest/FindUpperCasePackage.cmake @@ -2,5 +2,4 @@ set(UCP_FOO TRUE) include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) -find_package_handle_standard_args(UpperCasePackage REQUIRED_VARS UCP_FOO - FOUND_VAR UPPERCASEPACKAGE_FOUND ) +find_package_handle_standard_args(UpperCasePackage REQUIRED_VARS UCP_FOO) |