Skip to content

Commit 2b49521

Browse files
committed
[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. (cherry picked from commit 302f4ae)
1 parent 9c6b2a0 commit 2b49521

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

lldb/source/API/CMakeLists.txt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,15 @@ endif()
239239
if(LLDB_BUILD_FRAMEWORK)
240240
include(LLDBFramework)
241241

242-
add_dependencies(install-liblldb
243-
lldb-framework-cleanup)
244-
add_dependencies(install-liblldb-stripped
245-
lldb-framework-cleanup)
242+
if (TARGET install-liblldb)
243+
add_dependencies(install-liblldb
244+
lldb-framework-cleanup)
245+
endif()
246+
247+
if (TARGET install-liblldb-stripped)
248+
add_dependencies(install-liblldb-stripped
249+
lldb-framework-cleanup)
250+
endif()
246251
endif()
247252

248253
## BEGIN SWIFT

0 commit comments

Comments
 (0)