[JITLink][arm64] Support arm64e JIT'd code (initially enabled for MachO only).
[llvm-project.git] / clang-tools-extra / CMakeLists.txt
blob6b6f2b1ca227653e76f48f9c5e56aff45c7d8227
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(tool-template)
32 option(CLANG_TOOLS_EXTRA_INCLUDE_DOCS "Generate build targets for the Clang Extra Tools docs."
33   ${LLVM_INCLUDE_DOCS})
34 if( CLANG_TOOLS_EXTRA_INCLUDE_DOCS )
35   add_subdirectory(docs)
36 endif()
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)
43 endif()
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)
50 endif()