summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-08-17 14:16:02 +0000
committerKitware Robot <kwrobot@kitware.com>2022-08-17 10:16:09 -0400
commitbc7dca3497e1bcedfcdf646708bcec169f3d45b4 (patch)
treee012bf87cfc2f99d885ea546b8d070e1e0555b52
parentd3f58ea453907a171a4572ddb054ea98ddb5669e (diff)
parent9063674517e4244155f8286c2106dfb2707be0f4 (diff)
downloadcmake-bc7dca3497e1bcedfcdf646708bcec169f3d45b4.tar.gz
Merge topic 'FindVulkan-tolerate-FATAL_ERROR' into release-3.24
9063674517 Help: Add 3.24 release note about FindVulkan component enforcement bc01362368 FindVulkan: Restore tolerance of unknown FATAL_ERROR component Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7583
-rw-r--r--Help/release/3.24.rst5
-rw-r--r--Modules/FindVulkan.cmake10
2 files changed, 15 insertions, 0 deletions
diff --git a/Help/release/3.24.rst b/Help/release/3.24.rst
index 3141255c5e..7db9c915b5 100644
--- a/Help/release/3.24.rst
+++ b/Help/release/3.24.rst
@@ -317,6 +317,11 @@ Deprecated and Removed Features
* The :module:`FindGLUT` module no longer provides the undocumented
``GLUT_LIBRARY`` and ``GLUT_INCLUDE_PATH`` result variables.
+* The :module:`FindVulkan` module no longer silently ignores unknown
+ components requested by a ``find_package(Vulkan REQUIRED ...)`` call.
+ With the addition of support for components, requests for unknown
+ components now produce an error.
+
Other Changes
=============
diff --git a/Modules/FindVulkan.cmake b/Modules/FindVulkan.cmake
index 2c702274cb..7ca7d03bfa 100644
--- a/Modules/FindVulkan.cmake
+++ b/Modules/FindVulkan.cmake
@@ -172,6 +172,16 @@ environment.
cmake_policy(PUSH)
cmake_policy(SET CMP0057 NEW)
+# Provide compatibility with a common invalid component request that
+# was silently ignored prior to CMake 3.24.
+if("FATAL_ERROR" IN_LIST Vulkan_FIND_COMPONENTS)
+ message(AUTHOR_WARNING
+ "Ignoring unknown component 'FATAL_ERROR'.\n"
+ "The find_package() command documents no such argument."
+ )
+ list(REMOVE_ITEM Vulkan_FIND_COMPONENTS "FATAL_ERROR")
+endif()
+
# For backward compatibility as `FindVulkan` in previous CMake versions allow to retrieve `glslc`
# and `glslangValidator` without requesting the corresponding component.
if(NOT glslc IN_LIST Vulkan_FIND_COMPONENTS)