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
3
3
SBLineEntryTest.cpp
4
4
SBMutexTest.cpp
5
5
6
+ SBAPITEST
7
+
6
8
LINK_LIBS
7
9
liblldb
8
10
)
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ endif()
12
12
13
13
function (add_lldb_unittest test_name)
14
14
cmake_parse_arguments (ARG
15
- ""
15
+ "SBAPITEST "
16
16
""
17
17
"LINK_LIBS;LINK_COMPONENTS"
18
18
${ARGN} )
@@ -21,6 +21,10 @@ function(add_lldb_unittest test_name)
21
21
message (FATAL_ERROR "Unit test name must end with 'Tests' for lit to find it." )
22
22
endif ()
23
23
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
+
24
28
list (APPEND LLVM_LINK_COMPONENTS ${ARG_LINK_COMPONENTS} )
25
29
26
30
add_unittest(LLDBUnitTests
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ add_lldb_unittest(DAPTests
12
12
TestBase.cpp
13
13
VariablesTest.cpp
14
14
15
+ SBAPITEST
16
+
15
17
LINK_COMPONENTS
16
18
Support
17
19
LINK_LIBS
You can’t perform that action at this time.
0 commit comments