CMakeLists.txt 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. add_custom_target(ClangUnitTests)
  2. set_target_properties(ClangUnitTests PROPERTIES FOLDER "Clang tests")
  3. if(CLANG_BUILT_STANDALONE)
  4. # LLVMTestingSupport library is needed for some of the unittests.
  5. if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
  6. AND NOT TARGET LLVMTestingSupport)
  7. add_subdirectory(${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
  8. lib/Testing/Support)
  9. endif()
  10. endif()
  11. # add_clang_unittest(test_dirname file1.cpp file2.cpp)
  12. #
  13. # Will compile the list of files together and link against the clang
  14. # Produces a binary named 'basename(test_dirname)'.
  15. function(add_clang_unittest test_dirname)
  16. add_unittest(ClangUnitTests ${test_dirname} ${ARGN})
  17. endfunction()
  18. add_subdirectory(Basic)
  19. add_subdirectory(Lex)
  20. add_subdirectory(Driver)
  21. if(CLANG_ENABLE_STATIC_ANALYZER)
  22. add_subdirectory(Analysis)
  23. add_subdirectory(StaticAnalyzer)
  24. add_subdirectory(Frontend)
  25. endif()
  26. add_subdirectory(ASTMatchers)
  27. add_subdirectory(AST)
  28. add_subdirectory(CrossTU)
  29. add_subdirectory(Tooling)
  30. add_subdirectory(Format)
  31. add_subdirectory(Rewrite)
  32. add_subdirectory(Sema)
  33. add_subdirectory(CodeGen)
  34. # FIXME: libclang unit tests are disabled on Windows due
  35. # to failures, mostly in libclang.VirtualFileOverlay_*.
  36. if(NOT WIN32 AND CLANG_TOOL_LIBCLANG_BUILD)
  37. add_subdirectory(libclang)
  38. endif()
  39. add_subdirectory(DirectoryWatcher)
  40. add_subdirectory(Rename)
  41. add_subdirectory(Index)
  42. add_subdirectory(Serialization)