[Lldb-commits] [lldb] 302f4ae - [lldb] Only add lldb-framework-cleanup dependency to existing targets

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 10 16:23:50 PST 2023


Author: Jonas Devlieghere
Date: 2023-01-10T16:23:43-08:00
New Revision: 302f4aef7930c125236f071140eb9482532f2877

URL: https://github.com/llvm/llvm-project/commit/302f4aef7930c125236f071140eb9482532f2877
DIFF: https://github.com/llvm/llvm-project/commit/302f4aef7930c125236f071140eb9482532f2877.diff

LOG: [lldb] Only add lldb-framework-cleanup dependency to existing targets

The Xcode standalone build doesn't have the install-liblldb and
install-liblldb-stripped targets. Fix the resulting CMake error "Cannot
add target-level dependencies to non-existent target" by only adding the
dependency when the targets exist.

Added: 
    

Modified: 
    lldb/source/API/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt
index f3c8814fcc82d..3e189f387f1ca 100644
--- a/lldb/source/API/CMakeLists.txt
+++ b/lldb/source/API/CMakeLists.txt
@@ -212,8 +212,13 @@ endif()
 if(LLDB_BUILD_FRAMEWORK)
   include(LLDBFramework)
 
-  add_dependencies(install-liblldb
-    lldb-framework-cleanup)
-  add_dependencies(install-liblldb-stripped
-    lldb-framework-cleanup)
+  if (TARGET install-liblldb)
+    add_dependencies(install-liblldb
+      lldb-framework-cleanup)
+  endif()
+
+  if (TARGET install-liblldb-stripped)
+    add_dependencies(install-liblldb-stripped
+      lldb-framework-cleanup)
+  endif()
 endif()


        


More information about the lldb-commits mailing list