Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / tools / lldb-dap / CMakeLists.txt
blobc71c80981890bd58ac639b2c11d3aefe7ebbfb19
1 if ( CMAKE_SYSTEM_NAME MATCHES "Windows" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
2   list(APPEND extra_libs lldbHost)
3 endif ()
5 if (HAVE_LIBPTHREAD)
6   list(APPEND extra_libs pthread)
7 endif ()
10 if(APPLE)
11   configure_file(
12     ${CMAKE_CURRENT_SOURCE_DIR}/lldb-dap-Info.plist.in
13     ${CMAKE_CURRENT_BINARY_DIR}/lldb-dap-Info.plist
14     )
15   # Inline info plist in binary (use target_link_options for this as soon as CMake 3.13 is available)
16   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_BINARY_DIR}/lldb-dap-Info.plist")
17 endif()
19 # We need to include the llvm components we depend on manually, as liblldb does
20 # not re-export those.
21 set(LLVM_LINK_COMPONENTS Support)
22 set(LLVM_TARGET_DEFINITIONS Options.td)
23 tablegen(LLVM Options.inc -gen-opt-parser-defs)
24 add_public_tablegen_target(LLDBDAPOptionsTableGen)
25 add_lldb_tool(lldb-dap
26   lldb-dap.cpp
27   BreakpointBase.cpp
28   ExceptionBreakpoint.cpp
29   FifoFiles.cpp
30   FunctionBreakpoint.cpp
31   IOStream.cpp
32   JSONUtils.cpp
33   LLDBUtils.cpp
34   OutputRedirector.cpp
35   ProgressEvent.cpp
36   RunInTerminal.cpp
37   SourceBreakpoint.cpp
38   DAP.cpp
40   LINK_LIBS
41     liblldb
42     ${extra_libs}
44   LINK_COMPONENTS
45     Option
46     Support
47   )
49 if(LLDB_BUILD_FRAMEWORK)
50   # In the build-tree, we know the exact path to the framework directory.
51   # The installed framework can be in different locations.
52   lldb_setup_rpaths(lldb-dap
53     BUILD_RPATH
54       "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}"
55     INSTALL_RPATH
56       "@loader_path/../../../SharedFrameworks"
57       "@loader_path/../../System/Library/PrivateFrameworks"
58       "@loader_path/../../Library/PrivateFrameworks"
59   )
60 endif()