[Lldb-commits] [PATCH] D115882: [lldb] Silence CMake warnings about missing FindFBSDVMCore

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 16 08:13:27 PST 2021


mgorny created this revision.
mgorny added reviewers: labath, krytarowski, emaste.
mgorny requested review of this revision.

Pass QUIET to find_package() in order to quiet the warning about missing
FindFBSDVMCore.cmake.  FBSDVMCore always provides native CMake config
files, therefore providing a fallback module serves no purpose.


https://reviews.llvm.org/D115882

Files:
  lldb/cmake/modules/LLDBConfig.cmake


Index: lldb/cmake/modules/LLDBConfig.cmake
===================================================================
--- lldb/cmake/modules/LLDBConfig.cmake
+++ lldb/cmake/modules/LLDBConfig.cmake
@@ -25,7 +25,7 @@
 
 macro(add_optional_dependency variable description package found)
   cmake_parse_arguments(ARG
-    ""
+    "QUIET"
     "VERSION"
     ""
     ${ARGN})
@@ -45,7 +45,11 @@
   endif()
 
   if(${find_package})
-    find_package(${package} ${ARG_VERSION} ${maybe_required})
+    set(maybe_quiet)
+    if(ARG_QUIET)
+      set(maybe_quiet QUIET)
+    endif()
+    find_package(${package} ${ARG_VERSION} ${maybe_required} ${maybe_quiet})
     set(${variable} "${${found}}")
   endif()
 
@@ -58,7 +62,7 @@
 add_optional_dependency(LLDB_ENABLE_LUA "Enable Lua scripting support in LLDB" LuaAndSwig LUAANDSWIG_FOUND)
 add_optional_dependency(LLDB_ENABLE_PYTHON "Enable Python scripting support in LLDB" PythonAndSwig PYTHONANDSWIG_FOUND)
 add_optional_dependency(LLDB_ENABLE_LIBXML2 "Enable Libxml 2 support in LLDB" LibXml2 LIBXML2_FOUND VERSION 2.8)
-add_optional_dependency(LLDB_ENABLE_FBSDVMCORE "Enable libfbsdvmcore support in LLDB" FBSDVMCore FBSDVMCore_FOUND)
+add_optional_dependency(LLDB_ENABLE_FBSDVMCORE "Enable libfbsdvmcore support in LLDB" FBSDVMCore FBSDVMCore_FOUND QUIET)
 
 option(LLDB_USE_SYSTEM_SIX "Use six.py shipped with system and do not install a copy of it" OFF)
 option(LLDB_USE_ENTITLEMENTS "When codesigning, use entitlements if available" ON)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115882.394886.patch
Type: text/x-patch
Size: 1478 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211216/aa7feb72/attachment.bin>


More information about the lldb-commits mailing list