[lldb/cmake] Enable more verbose find_package output.
Summary:
The purpose of this patch is to make identifying missing dependencies clearer to the user.
`find_package` will report if a package is not found, that output, combined with the exiting
status message, is clearer than not having the additional verbosity.
If the SWIG dependency is required {LLDB_ENABLE_PYTHON, LLDB_ENABLE_LUA}
and SWIG is not available, fail the configuration step. Terminate the
configure early rather than later with a clear error message.
We could possibly modify:
`llvm-project/lldb/cmake/modules/FindPythonInterpAndLibs.cmake`
However, the patch here seems clear in my opinion.
Reviewers: aadsm, hhb, JDevlieghere
Reviewed By: JDevlieghere
Subscribers: labath, jrm, mgorny, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D74917
diff --git a/lldb/cmake/modules/FindLuaAndSwig.cmake b/lldb/cmake/modules/FindLuaAndSwig.cmake
index 2e99933..cc9083c 100644
--- a/lldb/cmake/modules/FindLuaAndSwig.cmake
+++ b/lldb/cmake/modules/FindLuaAndSwig.cmake
@@ -7,9 +7,9 @@
if(LUA_LIBRARIES AND LUA_INCLUDE_DIR AND SWIG_EXECUTABLE)
set(LUAANDSWIG_FOUND TRUE)
else()
- find_package(SWIG 2.0 QUIET)
+ find_package(SWIG 2.0)
if (SWIG_FOUND)
- find_package(Lua QUIET)
+ find_package(Lua)
if(LUA_FOUND AND SWIG_FOUND)
mark_as_advanced(
LUA_LIBRARIES
diff --git a/lldb/cmake/modules/FindPythonInterpAndLibs.cmake b/lldb/cmake/modules/FindPythonInterpAndLibs.cmake
index 8586225..5c04783 100644
--- a/lldb/cmake/modules/FindPythonInterpAndLibs.cmake
+++ b/lldb/cmake/modules/FindPythonInterpAndLibs.cmake
@@ -7,10 +7,10 @@
if(PYTHON_LIBRARIES AND PYTHON_INCLUDE_DIRS AND PYTHON_EXECUTABLE AND SWIG_EXECUTABLE)
set(PYTHONINTERPANDLIBS_FOUND TRUE)
else()
- find_package(SWIG 2.0 QUIET)
+ find_package(SWIG 2.0)
if (SWIG_FOUND)
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
- find_package(Python3 COMPONENTS Interpreter Development QUIET)
+ find_package(Python3 COMPONENTS Interpreter Development)
if (Python3_FOUND AND Python3_Interpreter_FOUND)
set(PYTHON_LIBRARIES ${Python3_LIBRARIES})
set(PYTHON_INCLUDE_DIRS ${Python3_INCLUDE_DIRS})
@@ -22,8 +22,8 @@
SWIG_EXECUTABLE)
endif()
else()
- find_package(PythonInterp QUIET)
- find_package(PythonLibs QUIET)
+ find_package(PythonInterp)
+ find_package(PythonLibs)
if(PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND AND SWIG_FOUND)
if (NOT CMAKE_CROSSCOMPILING)
string(REPLACE "." ";" pythonlibs_version_list ${PYTHONLIBS_VERSION_STRING})