[Driver] Remove ignored Flag form of -fauto-profile/-fprofile-sample-use
[llvm-project.git] / lldb / cmake / modules / FindLuaAndSwig.cmake
blob33fadb2a0974074267fbbac3a35742fa6b09d507
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)
12     if(LUA_FOUND)
13       # Find the Lua executable. Only required to run a subset of the Lua
14       # tests.
15       find_program(LUA_EXECUTABLE
16         NAMES
17         "lua"
18         "lua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}"
19       )
20       mark_as_advanced(
21         LUA_LIBRARIES
22         LUA_INCLUDE_DIR
23         LUA_VERSION_MINOR
24         LUA_VERSION_MAJOR
25         LUA_EXECUTABLE)
26     endif()
27   else()
28     message(STATUS "SWIG 4 or later is required for Lua support in LLDB but could not be found")
29   endif()
32   include(FindPackageHandleStandardArgs)
33   find_package_handle_standard_args(LuaAndSwig
34                                     FOUND_VAR
35                                       LUAANDSWIG_FOUND
36                                     REQUIRED_VARS
37                                       LUA_LIBRARIES
38                                       LUA_INCLUDE_DIR
39                                       LUA_VERSION_MINOR
40                                       LUA_VERSION_MAJOR
41                                       LLDB_ENABLE_SWIG)
42 endif()