[Lldb-commits] [lldb] b5467ec - [lldb] Use LLDB_ENABLE_SWIG as the canonical CMake variable

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 30 12:46:18 PST 2022


Author: Jonas Devlieghere
Date: 2022-11-30T12:46:13-08:00
New Revision: b5467ecc0f3b22082023e99412d4148ac41530be

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

LOG: [lldb] Use LLDB_ENABLE_SWIG as the canonical CMake variable

Use LLDB_ENABLE_SWIG instead of SWIG_EXECUTABLE or SWIG_FOUND as the
canonical CMake variable to determine whether we have SWIG available in
LLDB. This is a follow-up to b3c978e850d3.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/lldb/cmake/modules/FindLuaAndSwig.cmake b/lldb/cmake/modules/FindLuaAndSwig.cmake
index dd51ea1ef4c18..763bf0a7bb993 100644
--- a/lldb/cmake/modules/FindLuaAndSwig.cmake
+++ b/lldb/cmake/modules/FindLuaAndSwig.cmake
@@ -4,16 +4,15 @@
 #
 # Find Lua and SWIG as a whole.
 
-if(LUA_LIBRARIES AND LUA_INCLUDE_DIR AND SWIG_EXECUTABLE)
+if(LUA_LIBRARIES AND LUA_INCLUDE_DIR AND LLDB_ENABLE_SWIG)
   set(LUAANDSWIG_FOUND TRUE)
 else()
   if (LLDB_ENABLE_SWIG)
     find_package(Lua 5.3 EXACT)
-    if(LUA_FOUND AND SWIG_FOUND)
+    if(LUA_FOUND)
       mark_as_advanced(
         LUA_LIBRARIES
-        LUA_INCLUDE_DIR
-        SWIG_EXECUTABLE)
+        LUA_INCLUDE_DIR)
     endif()
   else()
     message(STATUS "SWIG 3 or later is required for Lua support in LLDB but could not be found")

diff  --git a/lldb/cmake/modules/FindPythonAndSwig.cmake b/lldb/cmake/modules/FindPythonAndSwig.cmake
index 1b7e1657e364b..d9305ab31f225 100644
--- a/lldb/cmake/modules/FindPythonAndSwig.cmake
+++ b/lldb/cmake/modules/FindPythonAndSwig.cmake
@@ -30,12 +30,11 @@ macro(FindPython3)
       Python3_LIBRARIES
       Python3_INCLUDE_DIRS
       Python3_EXECUTABLE
-      Python3_RPATH
-      SWIG_EXECUTABLE)
+      Python3_RPATH)
   endif()
 endmacro()
 
-if(Python3_LIBRARIES AND Python3_INCLUDE_DIRS AND Python3_EXECUTABLE AND SWIG_EXECUTABLE)
+if(Python3_LIBRARIES AND Python3_INCLUDE_DIRS AND Python3_EXECUTABLE AND LLDB_ENABLE_SWIG)
   set(PYTHONANDSWIG_FOUND TRUE)
 else()
   if (LLDB_ENABLE_SWIG)


        


More information about the lldb-commits mailing list