Skip to content

Commit

Permalink
[lldb] Only add lldb-framework-cleanup dependency to existing targets
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JDevlieghere committed Jan 11, 2023
1 parent cf9ee87 commit 302f4ae
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions lldb/source/API/CMakeLists.txt
Expand Up @@ -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()

0 comments on commit 302f4ae

Please sign in to comment.