Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / cmake / modules / FindLuaAndSwig.cmake
blob11548b76f843f084474c38d4f208ecf6442c7dd9
1 #.rst:
2 # FindLuaAndSwig
3 # --------------
5 # Find Lua and SWIG as a whole.
7 if(LUA_LIBRARIES AND LUA_INCLUDE_DIR AND LLDB_ENABLE_SWIG)
8   set(LUAANDSWIG_FOUND TRUE)
9 else()
10   if (LLDB_ENABLE_SWIG)
11     find_package(Lua 5.3 EXACT)
12     if(LUA_FOUND)
13       mark_as_advanced(
14         LUA_LIBRARIES
15         LUA_INCLUDE_DIR)
16     endif()
17   else()
18     message(STATUS "SWIG 4 or later is required for Lua support in LLDB but could not be found")
19   endif()
22   include(FindPackageHandleStandardArgs)
23   find_package_handle_standard_args(LuaAndSwig
24                                     FOUND_VAR
25                                       LUAANDSWIG_FOUND
26                                     REQUIRED_VARS
27                                       LUA_LIBRARIES
28                                       LUA_INCLUDE_DIR
29                                       LLDB_ENABLE_SWIG)
30 endif()