File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ add_lldb_unittest(APITests
33 SBLineEntryTest.cpp
44 SBMutexTest.cpp
55
6+ SBAPITEST
7+
68 LINK_LIBS
79 liblldb
810 )
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ endif()
1212
1313function (add_lldb_unittest test_name)
1414 cmake_parse_arguments (ARG
15- ""
15+ "SBAPITEST "
1616 ""
1717 "LINK_LIBS;LINK_COMPONENTS"
1818 ${ARGN} )
@@ -21,6 +21,10 @@ function(add_lldb_unittest test_name)
2121 message (FATAL_ERROR "Unit test name must end with 'Tests' for lit to find it." )
2222 endif ()
2323
24+ if ("liblldb" IN_LIST ARG_LINK_LIBS AND NOT ARG_SBAPITEST)
25+ message (FATAL_ERROR "The ${test_name} are not allowed to link liblldb." )
26+ endif ()
27+
2428 list (APPEND LLVM_LINK_COMPONENTS ${ARG_LINK_COMPONENTS} )
2529
2630 add_unittest(LLDBUnitTests
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ add_lldb_unittest(DAPTests
1212 TestBase.cpp
1313 VariablesTest.cpp
1414
15+ SBAPITEST
16+
1517 LINK_COMPONENTS
1618 Support
1719 LINK_LIBS
You can’t perform that action at this time.
0 commit comments