diff options
author | Michal Gorny <mgorny@gentoo.org> | 2017-08-21 17:41:39 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2017-08-21 17:41:39 +0000 |
commit | d5ac1812b7fa2f748b900de09b9160cf8a5c5a12 (patch) | |
tree | 95957d355e1c9b496dc391045f8c8f959fc15578 | |
parent | 7e1c51e0c143568f4191e6d69dc699638b0a1542 (diff) | |
download | bcm5719-llvm-d5ac1812b7fa2f748b900de09b9160cf8a5c5a12.tar.gz bcm5719-llvm-d5ac1812b7fa2f748b900de09b9160cf8a5c5a12.zip |
[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
-rw-r--r-- | lldb/unittests/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/unittests/CMakeLists.txt b/lldb/unittests/CMakeLists.txt index c7c3140b121..f7b611802fb 100644 --- a/lldb/unittests/CMakeLists.txt +++ b/lldb/unittests/CMakeLists.txt @@ -19,6 +19,12 @@ if (LLDB_BUILT_STANDALONE) if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest AND NOT TARGET gtest) add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/unittest utils/unittest) endif() + # LLVMTestingSupport library is needed for Process/gdb-remote. + if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Support + AND NOT TARGET LLVMTestingSupport) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/lib/Testing/Support + lib/Testing/Support) + endif() endif() function(add_lldb_unittest test_name) |