CMakeLists.txt 1.3 KB

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