Sam McCall | b9de3eb | 2019-05-07 07:05:47 | [diff] [blame] | 1 | include(CMakeDependentOption) |
John Ericson | 7c16647 | 2022-01-16 05:52:22 | [diff] [blame] | 2 | include(GNUInstallDirs) |
Sam McCall | b9de3eb | 2019-05-07 07:05:47 | [diff] [blame] | 3 | |
Nico Weber | 33c9dbb | 2020-09-03 23:37:29 | [diff] [blame] | 4 | option(CLANG_TIDY_ENABLE_STATIC_ANALYZER |
| 5 | "Include static analyzer checks in clang-tidy" ON) |
| 6 | |
Sam McCall | 7cc8377 | 2022-03-16 18:46:28 | [diff] [blame] | 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 | |
Chandler Carruth | d9063c4 | 2013-09-04 17:35:07 | [diff] [blame] | 16 | add_subdirectory(clang-apply-replacements) |
Alexander Shaposhnikov | bf3c84c | 2016-09-02 02:56:07 | [diff] [blame] | 17 | add_subdirectory(clang-reorder-fields) |
Chandler Carruth | d9063c4 | 2013-09-04 17:35:07 | [diff] [blame] | 18 | add_subdirectory(modularize) |
Alp Toker | 6462e9e | 2014-07-14 22:15:29 | [diff] [blame] | 19 | add_subdirectory(clang-tidy) |
Alp Toker | 6462e9e | 2014-07-14 22:15:29 | [diff] [blame] | 20 | |
Nico Weber | 5f5a745 | 2019-03-15 11:54:01 | [diff] [blame] | 21 | add_subdirectory(clang-change-namespace) |
Julie Hockett | e975a47 | 2018-03-22 23:34:46 | [diff] [blame] | 22 | add_subdirectory(clang-doc) |
Nico Weber | 43356f5 | 2019-03-25 14:09:10 | [diff] [blame] | 23 | add_subdirectory(clang-include-fixer) |
Haojian Wu | 357ef99 | 2016-09-21 13:18:19 | [diff] [blame] | 24 | add_subdirectory(clang-move) |
Nico Weber | 43356f5 | 2019-03-25 14:09:10 | [diff] [blame] | 25 | add_subdirectory(clang-query) |
Sam McCall | 41ac245 | 2022-04-13 19:13:34 | [diff] [blame] | 26 | add_subdirectory(include-cleaner) |
Alp Toker | 6462e9e | 2014-07-14 22:15:29 | [diff] [blame] | 27 | add_subdirectory(pp-trace) |
Sam McCall | 89cd86b | 2022-03-16 00:08:02 | [diff] [blame] | 28 | add_subdirectory(pseudo) |
Sam Panzer | 8e0df50 | 2012-08-24 23:29:33 | [diff] [blame] | 29 | add_subdirectory(tool-template) |
Chandler Carruth | 118232f | 2012-08-07 08:33:04 | [diff] [blame] | 30 | |
Alexander Kornienko | ad166f5 | 2016-01-27 11:37:08 | [diff] [blame] | 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 | |
Sam McCall | b9de3eb | 2019-05-07 07:05:47 | [diff] [blame] | 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() |
Sam McCall | 7cc8377 | 2022-03-16 18:46:28 | [diff] [blame] | 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() |