mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 16:46:05 +00:00
72 lines
1.3 KiB
CMake
72 lines
1.3 KiB
CMake
set(LLVM_LINK_COMPONENTS
|
|
AllTargetsAsmParsers
|
|
AllTargetsDescs
|
|
AllTargetsInfos
|
|
FrontendOpenMP
|
|
TargetParser
|
|
support
|
|
)
|
|
|
|
# Needed by LLVM's CMake checks because this file defines multiple targets.
|
|
set(LLVM_OPTIONAL_SOURCES ClangTidyMain.cpp ClangTidyToolMain.cpp)
|
|
|
|
add_clang_library(clangTidyMain STATIC
|
|
ClangTidyMain.cpp
|
|
|
|
LINK_LIBS
|
|
clangTidy
|
|
${ALL_CLANG_TIDY_CHECKS}
|
|
|
|
DEPENDS
|
|
omp_gen
|
|
ClangDriverOptions
|
|
)
|
|
|
|
clang_target_link_libraries(clangTidyMain
|
|
PRIVATE
|
|
clangAST
|
|
clangASTMatchers
|
|
clangBasic
|
|
clangTooling
|
|
clangToolingCore
|
|
)
|
|
|
|
# Support plugins.
|
|
if(CLANG_PLUGIN_SUPPORT)
|
|
set(support_plugins SUPPORT_PLUGINS)
|
|
endif()
|
|
|
|
add_clang_tool(clang-tidy
|
|
ClangTidyToolMain.cpp
|
|
|
|
DEPENDS
|
|
clang-resource-headers
|
|
${support_plugins}
|
|
)
|
|
clang_target_link_libraries(clang-tidy
|
|
PRIVATE
|
|
clangAST
|
|
clangASTMatchers
|
|
clangBasic
|
|
clangTooling
|
|
clangToolingCore
|
|
)
|
|
target_link_libraries(clang-tidy
|
|
PRIVATE
|
|
clangTidy
|
|
clangTidyMain
|
|
${ALL_CLANG_TIDY_CHECKS}
|
|
)
|
|
|
|
if(CLANG_PLUGIN_SUPPORT)
|
|
export_executable_symbols_for_plugins(clang-tidy)
|
|
endif()
|
|
|
|
install(PROGRAMS clang-tidy-diff.py
|
|
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
|
|
COMPONENT clang-tidy)
|
|
install(PROGRAMS run-clang-tidy.py
|
|
DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
|
COMPONENT clang-tidy
|
|
RENAME run-clang-tidy)
|