Index: clang-tools-extra/clang-apply-replacements/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-apply-replacements/CMakeLists.txt +++ clang-tools-extra/clang-apply-replacements/CMakeLists.txt @@ -4,8 +4,10 @@ add_clang_library(clangApplyReplacements lib/Tooling/ApplyReplacements.cpp +) - LINK_LIBS +clang_target_link_libraries(clangApplyReplacements + PRIVATE clangAST clangBasic clangRewrite Index: clang-tools-extra/clang-change-namespace/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-change-namespace/CMakeLists.txt +++ clang-tools-extra/clang-change-namespace/CMakeLists.txt @@ -5,8 +5,10 @@ add_clang_library(clangChangeNamespace ChangeNamespace.cpp +) - LINK_LIBS +clang_target_link_libraries(clangChangeNamespace + PRIVATE clangAST clangASTMatchers clangBasic Index: clang-tools-extra/clang-doc/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-doc/CMakeLists.txt +++ clang-tools-extra/clang-doc/CMakeLists.txt @@ -15,8 +15,10 @@ Representation.cpp Serialize.cpp YAMLGenerator.cpp +) - LINK_LIBS +clang_target_link_libraries(clangDoc + PRIVATE clangAnalysis clangAST clangASTMatchers Index: clang-tools-extra/clang-include-fixer/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-include-fixer/CMakeLists.txt +++ clang-tools-extra/clang-include-fixer/CMakeLists.txt @@ -11,6 +11,11 @@ YamlSymbolIndex.cpp LINK_LIBS + findAllSymbols + ) + +clang_target_link_libraries(clangIncludeFixer + PRIVATE clangAST clangBasic clangFormat @@ -21,7 +26,6 @@ clangSerialization clangTooling clangToolingCore - findAllSymbols ) add_subdirectory(plugin) Index: clang-tools-extra/clang-include-fixer/find-all-symbols/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-include-fixer/find-all-symbols/CMakeLists.txt +++ clang-tools-extra/clang-include-fixer/find-all-symbols/CMakeLists.txt @@ -12,8 +12,10 @@ PragmaCommentHandler.cpp STLPostfixHeaderMap.cpp SymbolInfo.cpp + ) - LINK_LIBS +clang_target_link_libraries(findAllSymbols + PRIVATE clangAST clangASTMatchers clangBasic Index: clang-tools-extra/clang-move/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-move/CMakeLists.txt +++ clang-tools-extra/clang-move/CMakeLists.txt @@ -6,8 +6,10 @@ add_clang_library(clangMove Move.cpp HelperDeclRefGraph.cpp + ) - LINK_LIBS +clang_target_link_libraries(clangMove + PRIVATE clangAnalysis clangAST clangASTMatchers Index: clang-tools-extra/clang-query/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-query/CMakeLists.txt +++ clang-tools-extra/clang-query/CMakeLists.txt @@ -7,8 +7,10 @@ add_clang_library(clangQuery Query.cpp QueryParser.cpp + ) - LINK_LIBS +clang_target_link_libraries(clangQuery + PRIVATE clangAST clangASTMatchers clangBasic Index: clang-tools-extra/clang-reorder-fields/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-reorder-fields/CMakeLists.txt +++ clang-tools-extra/clang-reorder-fields/CMakeLists.txt @@ -5,8 +5,10 @@ add_clang_library(clangReorderFields ReorderFieldsAction.cpp +) - LINK_LIBS +clang_target_link_libraries(clangReorderFields + PRIVATE clangAST clangASTMatchers clangBasic Index: clang-tools-extra/clang-tidy/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/CMakeLists.txt +++ clang-tools-extra/clang-tidy/CMakeLists.txt @@ -15,8 +15,10 @@ DEPENDS ClangSACheckers + ) - LINK_LIBS +clang_target_link_libraries(clangTidy + PRIVATE clangAnalysis clangAST clangASTMatchers @@ -32,7 +34,8 @@ ) if(CLANG_ENABLE_STATIC_ANALYZER) - target_link_libraries(clangTidy PRIVATE + clang_target_link_libraries(clangTidy + PRIVATE clangStaticAnalyzerCore clangStaticAnalyzerFrontend ) Index: clang-tools-extra/clang-tidy/abseil/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/abseil/CMakeLists.txt +++ clang-tools-extra/clang-tidy/abseil/CMakeLists.txt @@ -26,12 +26,16 @@ UpgradeDurationConversionsCheck.cpp LINK_LIBS + clangTidy + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyAbseilModule + PRIVATE clangAST clangASTMatchers clangBasic clangLex - clangTidy - clangTidyUtils clangTooling clangTransformer ) Index: clang-tools-extra/clang-tidy/android/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/android/CMakeLists.txt +++ clang-tools-extra/clang-tidy/android/CMakeLists.txt @@ -23,10 +23,14 @@ ComparisonInTempFailureRetryCheck.cpp LINK_LIBS + clangTidy + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyAndroidModule + PRIVATE clangAST clangASTMatchers clangBasic clangLex - clangTidy - clangTidyUtils ) Index: clang-tools-extra/clang-tidy/boost/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/boost/CMakeLists.txt +++ clang-tools-extra/clang-tidy/boost/CMakeLists.txt @@ -8,10 +8,14 @@ UseToStringCheck.cpp LINK_LIBS + clangTidy + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyBoostModule + PRIVATE clangAST clangASTMatchers clangBasic clangLex - clangTidy - clangTidyUtils ) Index: clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt +++ clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt @@ -59,13 +59,17 @@ VirtualNearMissCheck.cpp LINK_LIBS + clangTidy + clangTidyCppCoreGuidelinesModule + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyBugproneModule + PRIVATE clangAnalysis clangAST clangASTMatchers clangBasic clangLex - clangTidy - clangTidyCppCoreGuidelinesModule - clangTidyUtils clangTooling ) Index: clang-tools-extra/clang-tidy/cert/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/cert/CMakeLists.txt +++ clang-tools-extra/clang-tidy/cert/CMakeLists.txt @@ -21,10 +21,6 @@ VariadicFunctionDefCheck.cpp LINK_LIBS - clangAST - clangASTMatchers - clangBasic - clangLex clangTidy clangTidyBugproneModule clangTidyGoogleModule @@ -33,3 +29,11 @@ clangTidyReadabilityModule clangTidyUtils ) + +clang_target_link_libraries(clangTidyCERTModule + PRIVATE + clangAST + clangASTMatchers + clangBasic + clangLex + ) Index: clang-tools-extra/clang-tidy/cppcoreguidelines/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/cppcoreguidelines/CMakeLists.txt +++ clang-tools-extra/clang-tidy/cppcoreguidelines/CMakeLists.txt @@ -27,15 +27,19 @@ SpecialMemberFunctionsCheck.cpp LINK_LIBS - clangAST - clangASTMatchers - clangBasic - clangLex - clangSerialization clangTidy clangTidyMiscModule clangTidyModernizeModule clangTidyReadabilityModule clangTidyUtils + ) + +clang_target_link_libraries(clangTidyCppCoreGuidelinesModule + PRIVATE + clangAST + clangASTMatchers + clangBasic + clangLex + clangSerialization clangTooling ) Index: clang-tools-extra/clang-tidy/darwin/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/darwin/CMakeLists.txt +++ clang-tools-extra/clang-tidy/darwin/CMakeLists.txt @@ -9,11 +9,15 @@ DispatchOnceNonstaticCheck.cpp LINK_LIBS + clangTidy + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyDarwinModule + PRIVATE clangAnalysis clangAST clangASTMatchers clangBasic clangLex - clangTidy - clangTidyUtils ) Index: clang-tools-extra/clang-tidy/fuchsia/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/fuchsia/CMakeLists.txt +++ clang-tools-extra/clang-tidy/fuchsia/CMakeLists.txt @@ -14,11 +14,15 @@ VirtualInheritanceCheck.cpp LINK_LIBS + clangTidy + clangTidyGoogleModule + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyFuchsiaModule + PRIVATE clangAST clangASTMatchers clangBasic clangLex - clangTidy - clangTidyGoogleModule - clangTidyUtils ) Index: clang-tools-extra/clang-tidy/google/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/google/CMakeLists.txt +++ clang-tools-extra/clang-tidy/google/CMakeLists.txt @@ -24,11 +24,15 @@ UsingNamespaceDirectiveCheck.cpp LINK_LIBS + clangTidy + clangTidyReadabilityModule + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyGoogleModule + PRIVATE clangAST clangASTMatchers clangBasic clangLex - clangTidy - clangTidyReadabilityModule - clangTidyUtils ) Index: clang-tools-extra/clang-tidy/hicpp/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/hicpp/CMakeLists.txt +++ clang-tools-extra/clang-tidy/hicpp/CMakeLists.txt @@ -11,11 +11,6 @@ SignedBitwiseCheck.cpp LINK_LIBS - clangAST - clangASTMatchers - clangBasic - clangLex - clangSerialization clangTidy clangTidyBugproneModule clangTidyCppCoreGuidelinesModule @@ -26,3 +21,12 @@ clangTidyReadabilityModule clangTidyUtils ) + +clang_target_link_libraries(clangTidyHICPPModule + PRIVATE + clangAST + clangASTMatchers + clangBasic + clangLex + clangSerialization + ) Index: clang-tools-extra/clang-tidy/linuxkernel/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/linuxkernel/CMakeLists.txt +++ clang-tools-extra/clang-tidy/linuxkernel/CMakeLists.txt @@ -8,10 +8,14 @@ MustCheckErrsCheck.cpp LINK_LIBS + clangTidy + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyLinuxKernelModule + PRIVATE clangAST clangASTMatchers clangBasic clangLex - clangTidy - clangTidyUtils ) Index: clang-tools-extra/clang-tidy/llvm/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/llvm/CMakeLists.txt +++ clang-tools-extra/clang-tidy/llvm/CMakeLists.txt @@ -12,12 +12,16 @@ TwineLocalCheck.cpp LINK_LIBS + clangTidy + clangTidyReadabilityModule + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyLLVMModule + PRIVATE clangAST clangASTMatchers clangBasic clangLex - clangTidy - clangTidyReadabilityModule - clangTidyUtils clangTooling ) Index: clang-tools-extra/clang-tidy/llvmlibc/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/llvmlibc/CMakeLists.txt +++ clang-tools-extra/clang-tidy/llvmlibc/CMakeLists.txt @@ -10,12 +10,16 @@ RestrictSystemLibcHeadersCheck.cpp LINK_LIBS + clangTidy + clangTidyPortabilityModule + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyLLVMLibcModule + PRIVATE clangAST clangASTMatchers clangBasic clangLex - clangTidy - clangTidyPortabilityModule - clangTidyUtils clangTooling ) Index: clang-tools-extra/clang-tidy/misc/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/misc/CMakeLists.txt +++ clang-tools-extra/clang-tidy/misc/CMakeLists.txt @@ -21,13 +21,17 @@ UnusedUsingDeclsCheck.cpp LINK_LIBS + clangTidy + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyMiscModule + PRIVATE clangAnalysis clangAST clangASTMatchers clangBasic clangLex clangSerialization - clangTidy - clangTidyUtils clangTooling ) Index: clang-tools-extra/clang-tidy/modernize/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/modernize/CMakeLists.txt +++ clang-tools-extra/clang-tidy/modernize/CMakeLists.txt @@ -40,12 +40,16 @@ UseUsingCheck.cpp LINK_LIBS + clangTidy + clangTidyReadabilityModule + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyModernizeModule + PRIVATE clangAST clangASTMatchers clangBasic clangLex - clangTidy - clangTidyReadabilityModule - clangTidyUtils clangTooling ) Index: clang-tools-extra/clang-tidy/mpi/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/mpi/CMakeLists.txt +++ clang-tools-extra/clang-tidy/mpi/CMakeLists.txt @@ -9,13 +9,17 @@ TypeMismatchCheck.cpp LINK_LIBS + clangTidy + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyMPIModule + PRIVATE clangAnalysis clangAST clangASTMatchers clangBasic clangLex - clangTidy - clangTidyUtils clangTooling clangStaticAnalyzerCheckers ) Index: clang-tools-extra/clang-tidy/objc/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/objc/CMakeLists.txt +++ clang-tools-extra/clang-tidy/objc/CMakeLists.txt @@ -14,10 +14,14 @@ SuperSelfCheck.cpp LINK_LIBS + clangTidy + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyObjCModule + PRIVATE clangAST clangASTMatchers clangBasic clangLex - clangTidy - clangTidyUtils ) Index: clang-tools-extra/clang-tidy/openmp/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/openmp/CMakeLists.txt +++ clang-tools-extra/clang-tidy/openmp/CMakeLists.txt @@ -9,9 +9,13 @@ UseDefaultNoneCheck.cpp LINK_LIBS + clangTidy + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyOpenMPModule + PRIVATE clangAST clangASTMatchers clangBasic - clangTidy - clangTidyUtils ) Index: clang-tools-extra/clang-tidy/performance/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/performance/CMakeLists.txt +++ clang-tools-extra/clang-tidy/performance/CMakeLists.txt @@ -21,11 +21,15 @@ UnnecessaryValueParamCheck.cpp LINK_LIBS + clangTidy + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyPerformanceModule + PRIVATE clangAST clangASTMatchers clangAnalysis clangBasic clangLex - clangTidy - clangTidyUtils ) Index: clang-tools-extra/clang-tidy/plugin/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/plugin/CMakeLists.txt +++ clang-tools-extra/clang-tidy/plugin/CMakeLists.txt @@ -2,12 +2,16 @@ ClangTidyPlugin.cpp LINK_LIBS + clangTidy + ${ALL_CLANG_TIDY_CHECKS} + ) + +clang_target_link_libraries(clangTidyPlugin + PRIVATE clangAST clangASTMatchers clangBasic clangFrontend clangSema - clangTidy clangTooling - ${ALL_CLANG_TIDY_CHECKS} ) Index: clang-tools-extra/clang-tidy/portability/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/portability/CMakeLists.txt +++ clang-tools-extra/clang-tidy/portability/CMakeLists.txt @@ -9,11 +9,15 @@ SIMDIntrinsicsCheck.cpp LINK_LIBS + clangTidy + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyPortabilityModule + PRIVATE clangAST clangASTMatchers clangBasic clangLex - clangTidy - clangTidyUtils clangTooling ) Index: clang-tools-extra/clang-tidy/readability/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/readability/CMakeLists.txt +++ clang-tools-extra/clang-tidy/readability/CMakeLists.txt @@ -45,12 +45,16 @@ UseAnyOfAllOfCheck.cpp LINK_LIBS + clangTidy + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyReadabilityModule + PRIVATE clangAnalysis clangAST clangASTMatchers clangBasic clangLex - clangTidy - clangTidyUtils clangTooling ) Index: clang-tools-extra/clang-tidy/tool/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/tool/CMakeLists.txt +++ clang-tools-extra/clang-tidy/tool/CMakeLists.txt @@ -13,11 +13,15 @@ ClangTidyMain.cpp LINK_LIBS + clangTidy + ${ALL_CLANG_TIDY_CHECKS} + ) + +clang_target_link_libraries(clangTidyMain + PRIVATE clangAST clangASTMatchers clangBasic - clangTidy - ${ALL_CLANG_TIDY_CHECKS} clangTooling clangToolingCore ) Index: clang-tools-extra/clang-tidy/utils/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/utils/CMakeLists.txt +++ clang-tools-extra/clang-tidy/utils/CMakeLists.txt @@ -22,11 +22,15 @@ UsingInserter.cpp LINK_LIBS + clangTidy + ) + +clang_target_link_libraries(clangTidyUtils + PRIVATE clangAST clangASTMatchers clangBasic clangLex clangSema - clangTidy clangTransformer ) Index: clang-tools-extra/clang-tidy/zircon/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/zircon/CMakeLists.txt +++ clang-tools-extra/clang-tidy/zircon/CMakeLists.txt @@ -8,10 +8,14 @@ ZirconTidyModule.cpp LINK_LIBS + clangTidy + clangTidyUtils + ) + +clang_target_link_libraries(clangTidyZirconModule + PRIVATE clangAST clangASTMatchers clangBasic clangLex - clangTidy - clangTidyUtils ) Index: clang-tools-extra/clangd/CMakeLists.txt =================================================================== --- clang-tools-extra/clangd/CMakeLists.txt +++ clang-tools-extra/clangd/CMakeLists.txt @@ -96,6 +96,14 @@ refactor/Tweak.cpp LINK_LIBS + clangdSupport + clangTidy + ${LLVM_PTHREAD_LIB} + ${ALL_CLANG_TIDY_CHECKS} + ) + +clang_target_link_libraries(clangDaemon + PRIVATE clangAST clangASTMatchers clangBasic @@ -106,15 +114,11 @@ clangLex clangSema clangSerialization - clangTidy clangTooling clangToolingCore clangToolingInclusions clangToolingRefactoring clangToolingSyntax - clangdSupport - ${LLVM_PTHREAD_LIB} - ${ALL_CLANG_TIDY_CHECKS} ) add_subdirectory(refactor/tweaks) Index: clang-tools-extra/clangd/unittests/CMakeLists.txt =================================================================== --- clang-tools-extra/clangd/unittests/CMakeLists.txt +++ clang-tools-extra/clangd/unittests/CMakeLists.txt @@ -120,7 +120,6 @@ clangDaemon clangdSupport clangTidy - LLVMSupport LLVMTestingSupport )