[llvm-branch-commits] [clang] 2cec4d0 - Merging r371733:

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Nov 12 16:55:22 PST 2019


Author: Michal Gorny
Date: 2019-11-12T16:37:22-08:00
New Revision: 2cec4d0850afc3fdc46817d32ffd5b64682e004e

URL: https://github.com/llvm/llvm-project/commit/2cec4d0850afc3fdc46817d32ffd5b64682e004e
DIFF: https://github.com/llvm/llvm-project/commit/2cec4d0850afc3fdc46817d32ffd5b64682e004e.diff

LOG: 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
------------------------------------------------------------------------

Added: 
    

Modified: 
    clang/unittests/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/clang/unittests/CMakeLists.txt b/clang/unittests/CMakeLists.txt
index 9a41000cf438..4c222e24599f 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


        


More information about the llvm-branch-commits mailing list