150
|
1 include(CMakeDependentOption)
|
236
|
2 include(GNUInstallDirs)
|
150
|
3
|
221
|
4 option(CLANG_TIDY_ENABLE_STATIC_ANALYZER
|
|
5 "Include static analyzer checks in clang-tidy" ON)
|
|
6
|
236
|
7 if(CLANG_INCLUDE_TESTS)
|
|
8 umbrella_lit_testsuite_begin(check-clang-tools)
|
|
9
|
|
10 option(CLANG_TOOLS_TEST_USE_VG "Run Clang tools' tests under Valgrind" OFF)
|
|
11 if(CLANG_TOOLS_TEST_USE_VG)
|
|
12 set_property(GLOBAL APPEND PROPERTY LLVM_CLANG_TOOLS_LIT_EXTRA_ARGS "--vg")
|
|
13 endif()
|
|
14 endif()
|
|
15
|
150
|
16 add_subdirectory(clang-apply-replacements)
|
|
17 add_subdirectory(clang-reorder-fields)
|
|
18 add_subdirectory(modularize)
|
|
19 add_subdirectory(clang-tidy)
|
|
20
|
|
21 add_subdirectory(clang-change-namespace)
|
|
22 add_subdirectory(clang-doc)
|
|
23 add_subdirectory(clang-include-fixer)
|
|
24 add_subdirectory(clang-move)
|
|
25 add_subdirectory(clang-query)
|
236
|
26 add_subdirectory(include-cleaner)
|
150
|
27 add_subdirectory(pp-trace)
|
236
|
28 add_subdirectory(pseudo)
|
150
|
29 add_subdirectory(tool-template)
|
|
30
|
|
31 option(CLANG_TOOLS_EXTRA_INCLUDE_DOCS "Generate build targets for the Clang Extra Tools docs."
|
|
32 ${LLVM_INCLUDE_DOCS})
|
|
33 if( CLANG_TOOLS_EXTRA_INCLUDE_DOCS )
|
|
34 add_subdirectory(docs)
|
|
35 endif()
|
|
36
|
|
37 # clangd has its own CMake tree. It requires threads.
|
|
38 CMAKE_DEPENDENT_OPTION(CLANG_ENABLE_CLANGD "Build clangd language server" ON
|
|
39 "LLVM_ENABLE_THREADS" OFF)
|
|
40 if (CLANG_ENABLE_CLANGD)
|
|
41 add_subdirectory(clangd)
|
|
42 endif()
|
236
|
43
|
|
44 # Add the common testsuite after all the tools.
|
|
45 if(CLANG_INCLUDE_TESTS)
|
|
46 add_subdirectory(test)
|
|
47 add_subdirectory(unittests)
|
|
48 umbrella_lit_testsuite_end(check-clang-tools)
|
|
49 endif()
|