forked from OSchip/llvm-project
Support standalone build of clang-tidy unittest
Apply the same pattern as the one used in clangd/unittests/CMakeLists.txt Differential Revision: https://reviews.llvm.org/D96788
This commit is contained in:
parent
2d6b767c1d
commit
f0e4610572
|
@ -3,6 +3,15 @@ set(LLVM_LINK_COMPONENTS
|
|||
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})
|
||||
|
|
Loading…
Reference in New Issue