[Lldb-commits] [lldb] 07d2cda - [lldb/cmake] Enable more verbose find_package output.

Matt Davis via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 21 10:39:11 PST 2020


Author: Matt Davis
Date: 2020-02-21T10:37:02-08:00
New Revision: 07d2cdae11633139947f105888163adfd5646ce7

URL: https://github.com/llvm/llvm-project/commit/07d2cdae11633139947f105888163adfd5646ce7
DIFF: https://github.com/llvm/llvm-project/commit/07d2cdae11633139947f105888163adfd5646ce7.diff

LOG: [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

Added: 
    

Modified: 
    lldb/cmake/modules/FindLuaAndSwig.cmake
    lldb/cmake/modules/FindPythonInterpAndLibs.cmake

Removed: 
    


################################################################################
diff  --git a/lldb/cmake/modules/FindLuaAndSwig.cmake b/lldb/cmake/modules/FindLuaAndSwig.cmake
index 2e99933a7456..cc9083ce049a 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 858622541015..5c047831a029 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 @@ else()
           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})


        


More information about the lldb-commits mailing list