[PATCH] D67452: [clang] [unittest] Import LLVMTestingSupport if necessary

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 12 06:06:00 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL371733: [clang] [unittest] Import LLVMTestingSupport if necessary (authored by mgorny, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D67452?vs=219736&id=219897#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67452/new/

https://reviews.llvm.org/D67452

Files:
  cfe/trunk/unittests/CMakeLists.txt


Index: cfe/trunk/unittests/CMakeLists.txt
===================================================================
--- cfe/trunk/unittests/CMakeLists.txt
+++ cfe/trunk/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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67452.219897.patch
Type: text/x-patch
Size: 749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190912/007e68a8/attachment.bin>


More information about the cfe-commits mailing list