[CMake] Fix standalone build for debugserver on macOS
authorStefan Granitz <stefan.graenitz@gmail.com>
Thu, 29 Nov 2018 14:51:49 +0000 (14:51 +0000)
committerStefan Granitz <stefan.graenitz@gmail.com>
Thu, 29 Nov 2018 14:51:49 +0000 (14:51 +0000)
Summary:
Quick-fix to avoid CMake config issue:
```
CMake Error at /path/to/lldb/cmake/modules/AddLLDB.cmake:116 (add_dependencies):
  Cannot add target-level dependencies to non-existent target "lldb-suite".
```

Reviewers: xiaobai, beanz

Subscribers: mgorny, lldb-commits

Differential Revision: https://reviews.llvm.org/D55032

llvm-svn: 347869

lldb/tools/debugserver/CMakeLists.txt

index ae436b8..5823158 100644 (file)
@@ -8,12 +8,17 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
     "${CMAKE_SOURCE_DIR}/../../cmake"
     "${CMAKE_SOURCE_DIR}/../../cmake/modules"
     )
-  
+
   include(LLDBStandalone)
   include(AddLLDB)
 
   set(LLDB_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../../")
   include_directories(${LLDB_SOURCE_DIR}/include)
+
+  # lldb-suite is a dummy target that encompasses all the necessary tools and
+  # libraries for building a fully-functioning liblldb.
+  add_custom_target(lldb-suite)
+  set(LLDB_SUITE_TARGET lldb-suite)
 endif()
 
 add_subdirectory(source)