[PATCH] D96788: Support standalone build of clang-tidy unittest

serge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 25 02:51:34 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf0e461057221: Support standalone build of clang-tidy unittest (authored by serge-sans-paille).
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96788

Files:
  clang-tools-extra/unittests/clang-tidy/CMakeLists.txt


Index: clang-tools-extra/unittests/clang-tidy/CMakeLists.txt
===================================================================
--- clang-tools-extra/unittests/clang-tidy/CMakeLists.txt
+++ clang-tools-extra/unittests/clang-tidy/CMakeLists.txt
@@ -3,6 +3,15 @@
   Support
   )
 
+if(CLANG_BUILT_STANDALONE)
+  # LLVMTestingSupport library is needed for clang-tidy tests.
+  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()
+
 get_filename_component(CLANG_LINT_SOURCE_DIR
   ${CMAKE_CURRENT_SOURCE_DIR}/../../clang-tidy REALPATH)
 include_directories(${CLANG_LINT_SOURCE_DIR})


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96788.326333.patch
Type: text/x-patch
Size: 733 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210225/46aa61ef/attachment.bin>


More information about the cfe-commits mailing list