aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2019-09-12 13:06:12 +0000
committerTom Stellard <tstellar@redhat.com>2019-11-12 16:37:22 -0800
commit2cec4d0850afc3fdc46817d32ffd5b64682e004e (patch)
tree33dcc20824e88df461615468b3e5e34da84f5cc9
parent933cfc66fbe1de1b20c756db9a986f5aa841343c (diff)
downloadllvm-2cec4d0850afc3fdc46817d32ffd5b64682e004e.zip
llvm-2cec4d0850afc3fdc46817d32ffd5b64682e004e.tar.gz
llvm-2cec4d0850afc3fdc46817d32ffd5b64682e004e.tar.bz2
Merging r371733:
------------------------------------------------------------------------ r371733 | mgorny | 2019-09-12 06:06:12 -0700 (Thu, 12 Sep 2019) | 7 lines [clang] [unittest] Import LLVMTestingSupport if necessary Add LLVMTestingSupport directory from LLVM_MAIN_SRC_DIR when building clang stand-alone and LLVMTestingSupport library is not present. This is needed to fix stand-alone builds without clang-tools-extra. Differential Revision: https://reviews.llvm.org/D67452 ------------------------------------------------------------------------
-rw-r--r--clang/unittests/CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/unittests/CMakeLists.txt b/clang/unittests/CMakeLists.txt
index 9a41000..4c222e2 100644
--- a/clang/unittests/CMakeLists.txt
+++ b/clang/unittests/CMakeLists.txt
@@ -1,6 +1,15 @@
add_custom_target(ClangUnitTests)
set_target_properties(ClangUnitTests PROPERTIES FOLDER "Clang tests")
+if(CLANG_BUILT_STANDALONE)
+ # LLVMTestingSupport library is needed for some of the unittests.
+ 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()
+
# add_clang_unittest(test_dirname file1.cpp file2.cpp)
#
# Will compile the list of files together and link against the clang