1 add_custom_target(ClangUnitTests)
2 set_target_properties(ClangUnitTests PROPERTIES FOLDER "Clang/Tests")
4 if(CLANG_BUILT_STANDALONE)
5 # LLVMTesting* libraries are needed for some of the unittests.
6 if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Annotations
7 AND NOT TARGET LLVMTestingAnnotations)
8 add_subdirectory(${LLVM_MAIN_SRC_DIR}/lib/Testing/Annotations
9 lib/Testing/Annotations)
11 if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
12 AND NOT TARGET LLVMTestingSupport)
13 add_subdirectory(${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
18 # add_clang_unittest(test_dirname file1.cpp file2.cpp)
20 # Will compile the list of files together and link against the clang
21 # Produces a binary named 'basename(test_dirname)'.
22 function(add_clang_unittest test_dirname)
23 add_unittest(ClangUnitTests ${test_dirname} ${ARGN})
26 add_subdirectory(Basic)
28 add_subdirectory(Driver)
29 if(CLANG_ENABLE_STATIC_ANALYZER)
30 add_subdirectory(Analysis)
31 add_subdirectory(StaticAnalyzer)
33 add_subdirectory(ASTMatchers)
35 add_subdirectory(CrossTU)
36 add_subdirectory(Tooling)
37 add_subdirectory(Format)
38 add_subdirectory(Frontend)
39 add_subdirectory(Rewrite)
40 add_subdirectory(Sema)
41 add_subdirectory(CodeGen)
42 if(HAVE_CLANG_REPL_SUPPORT)
43 add_subdirectory(Interpreter)
45 # FIXME: libclang unit tests are disabled on Windows due
46 # to failures, mostly in libclang.VirtualFileOverlay_*.
47 if(NOT WIN32 AND CLANG_TOOL_LIBCLANG_BUILD)
48 add_subdirectory(libclang)
50 add_subdirectory(DirectoryWatcher)
51 add_subdirectory(Index)
52 add_subdirectory(InstallAPI)
53 add_subdirectory(Serialization)
54 add_subdirectory(Support)