Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / unittests / CMakeLists.txt
blobf4e4f585bdd800ac7053c905d7d90d8efd67b3f4
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)
10   endif()
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
14       lib/Testing/Support)
15   endif()
16 endif()
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})
24 endfunction()
26 add_subdirectory(Basic)
27 add_subdirectory(Lex)
28 add_subdirectory(Driver)
29 if(CLANG_ENABLE_STATIC_ANALYZER)
30   add_subdirectory(Analysis)
31   add_subdirectory(StaticAnalyzer)
32 endif()
33 add_subdirectory(ASTMatchers)
34 add_subdirectory(AST)
35 add_subdirectory(CrossTU)
36 add_subdirectory(Tooling)
37 add_subdirectory(Introspection)
38 add_subdirectory(Format)
39 add_subdirectory(Frontend)
40 add_subdirectory(Rewrite)
41 add_subdirectory(Sema)
42 add_subdirectory(CodeGen)
43 if(HAVE_CLANG_REPL_SUPPORT)
44   add_subdirectory(Interpreter)
45 endif()
46 # FIXME: libclang unit tests are disabled on Windows due
47 # to failures, mostly in libclang.VirtualFileOverlay_*.
48 if(NOT WIN32 AND CLANG_TOOL_LIBCLANG_BUILD) 
49   add_subdirectory(libclang)
50 endif()
51 add_subdirectory(DirectoryWatcher)
52 add_subdirectory(Rename)
53 add_subdirectory(Index)
54 add_subdirectory(Serialization)
55 add_subdirectory(Support)