From b5467ecc0f3b22082023e99412d4148ac41530be Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Wed, 30 Nov 2022 12:42:53 -0800 Subject: [PATCH] [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. --- lldb/cmake/modules/FindLuaAndSwig.cmake | 7 +++---- lldb/cmake/modules/FindPythonAndSwig.cmake | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lldb/cmake/modules/FindLuaAndSwig.cmake b/lldb/cmake/modules/FindLuaAndSwig.cmake index dd51ea1..763bf0a 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 1b7e165..d9305ab 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) -- 2.7.4