1 if(LLVM_BUILD_EXAMPLES)
5 configure_lit_site_cfg(
6 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
7 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
9 configure_lit_site_cfg(
10 ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
11 ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
14 # Don't include check-llvm into check-all without LLVM_BUILD_TOOLS.
15 if(NOT LLVM_BUILD_TOOLS)
16 set(EXCLUDE_FROM_ALL ON)
19 # Set the depends list as a variable so that it can grow conditionally.
20 # NOTE: Sync the substitutions in test/lit.cfg when adding to this list.
67 # If Intel JIT events are supported, depend on a tool that tests the listener.
68 if( LLVM_USE_INTEL_JITEVENTS )
69 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-jitlistener)
70 endif( LLVM_USE_INTEL_JITEVENTS )
73 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LLVMgold)
77 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-go)
81 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LTO)
85 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS}
87 ocaml_llvm_all_backends
91 ocaml_llvm_executionengine
96 ocaml_llvm_passmgr_builder
97 ocaml_llvm_scalar_opts
98 ocaml_llvm_transform_utils
103 if(LLVM_BUILD_EXAMPLES)
104 list(APPEND LLVM_TEST_DEPENDS
113 add_lit_testsuite(check-llvm "Running the LLVM regression tests"
114 ${CMAKE_CURRENT_BINARY_DIR}
115 PARAMS llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
116 llvm_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
117 DEPENDS ${LLVM_TEST_DEPENDS}
119 set_target_properties(check-llvm PROPERTIES FOLDER "Tests")
121 add_lit_testsuites(LLVM ${CMAKE_CURRENT_SOURCE_DIR}
122 PARAMS llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
123 llvm_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
124 DEPENDS ${LLVM_TEST_DEPENDS}
127 # Setup a legacy alias for 'check-llvm'. This will likely change to be an
128 # alias for 'check-all' at some point in the future.
129 add_custom_target(check)
130 add_dependencies(check check-llvm)
131 set_target_properties(check PROPERTIES FOLDER "Tests")