Bump version to 19.1.0 (final)
[llvm-project.git] / clang-tools-extra / CMakeLists.txt
blobf6a6b57b5ef0bc76cee6258f05d5d6e50d89df42
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")
15   endif()
16 endif()
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(pseudo)
31 add_subdirectory(tool-template)
33 option(CLANG_TOOLS_EXTRA_INCLUDE_DOCS "Generate build targets for the Clang Extra Tools docs."
34   ${LLVM_INCLUDE_DOCS})
35 if( CLANG_TOOLS_EXTRA_INCLUDE_DOCS )
36   add_subdirectory(docs)
37 endif()
39 # clangd has its own CMake tree. It requires threads.
40 CMAKE_DEPENDENT_OPTION(CLANG_ENABLE_CLANGD "Build clangd language server" ON
41                        "LLVM_ENABLE_THREADS" OFF)
42 if (CLANG_ENABLE_CLANGD)
43   add_subdirectory(clangd)
44 endif()
46 # Add the common testsuite after all the tools.
47 if(CLANG_INCLUDE_TESTS)
48   add_subdirectory(test)
49   add_subdirectory(unittests)
50   umbrella_lit_testsuite_end(check-clang-tools)
51 endif()