1add_custom_target(ClangUnitTests) 2set_target_properties(ClangUnitTests PROPERTIES FOLDER "Clang tests") 3 4# add_clang_unittest(test_dirname file1.cpp file2.cpp) 5# 6# Will compile the list of files together and link against the clang 7# Produces a binary named 'basename(test_dirname)'. 8function(add_clang_unittest test_dirname) 9 add_unittest(ClangUnitTests ${test_dirname} ${ARGN}) 10endfunction() 11 12add_subdirectory(Basic) 13add_subdirectory(Lex) 14add_subdirectory(Driver) 15if(CLANG_ENABLE_STATIC_ANALYZER) 16 add_subdirectory(StaticAnalyzer) 17 add_subdirectory(Frontend) 18endif() 19add_subdirectory(ASTMatchers) 20add_subdirectory(AST) 21add_subdirectory(Tooling) 22add_subdirectory(Format) 23add_subdirectory(Rewrite) 24add_subdirectory(Sema) 25add_subdirectory(CodeGen) 26# FIXME: libclang unit tests are disabled on Windows due 27# to failures, mostly in libclang.VirtualFileOverlay_*. 28if(NOT WIN32 AND CLANG_TOOL_LIBCLANG_BUILD) 29 add_subdirectory(libclang) 30endif() 31