Skip to content

Commit d5ac181

Browse files
committedAug 21, 2017
[unittests] Build LLVMTestingSupport for out-of-source builds
The Process/gdb-remote test now requires the LLVMTestingSupport library that is not installed by LLVM. As a result, when doing an out-of-source build it fails being unable to find the library. To solve that, build a local copy of the library when building LLDB with unittests and LLVM sources available. This is based on how we deal with bundled gtest sources. Differential Revision: https://reviews.llvm.org/D36886 llvm-svn: 311355
1 parent 7e1c51e commit d5ac181

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎lldb/unittests/CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ if (LLDB_BUILT_STANDALONE)
1919
if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest AND NOT TARGET gtest)
2020
add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/unittest utils/unittest)
2121
endif()
22+
# LLVMTestingSupport library is needed for Process/gdb-remote.
23+
if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
24+
AND NOT TARGET LLVMTestingSupport)
25+
add_subdirectory(${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
26+
lib/Testing/Support)
27+
endif()
2228
endif()
2329

2430
function(add_lldb_unittest test_name)

0 commit comments

Comments
 (0)