Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lldb/unittests/API/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ add_lldb_unittest(APITests
SBLineEntryTest.cpp
SBMutexTest.cpp

SBAPITEST

LINK_LIBS
liblldb
)
Expand Down
6 changes: 5 additions & 1 deletion lldb/unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ endif()

function(add_lldb_unittest test_name)
cmake_parse_arguments(ARG
""
"SBAPITEST"
""
"LINK_LIBS;LINK_COMPONENTS"
${ARGN})
Expand All @@ -21,6 +21,10 @@ function(add_lldb_unittest test_name)
message(FATAL_ERROR "Unit test name must end with 'Tests' for lit to find it.")
endif()

if ("liblldb" IN_LIST ARG_LINK_LIBS AND NOT ARG_SBAPITEST)
message(FATAL_ERROR "The ${test_name} are not allowed to link liblldb.")
endif()

list(APPEND LLVM_LINK_COMPONENTS ${ARG_LINK_COMPONENTS})

add_unittest(LLDBUnitTests
Expand Down
2 changes: 2 additions & 0 deletions lldb/unittests/DAP/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ add_lldb_unittest(DAPTests
TestBase.cpp
VariablesTest.cpp

SBAPITEST

LINK_COMPONENTS
Support
LINK_LIBS
Expand Down
Loading