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