1 llvm_canonicalize_cmake_booleans(
14 LLVM_USE_INTEL_JITEVENTS
17 LLVM_BYE_LINK_INTO_TOOLS
18 LLVM_EXAMPLEIRTRANSFORMS_LINK_INTO_TOOLS
21 LLVM_INLINER_MODEL_AUTOGENERATED
22 LLVM_RAEVICT_MODEL_AUTOGENERATED
23 LLVM_ENABLE_EXPENSIVE_CHECKS
24 LLVM_ENABLE_REVERSE_ITERATION
25 LLVM_INCLUDE_DXIL_TESTS
26 LLVM_TOOL_LLVM_DRIVER_BUILD
27 LLVM_INCLUDE_SPIRV_TOOLS_TESTS
30 configure_lit_site_cfg(
31 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
32 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
34 ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
43 configure_lit_site_cfg(
44 ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.py.in
45 ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg.py
47 ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.cfg.py
55 # Set the depends list as a variable so that it can grow conditionally.
56 # NOTE: Sync the substitutions in test/lit.cfg when adding to this list.
82 llvm-debuginfo-analyzer
96 llvm-install-name-tool
150 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-lto)
153 if(TARGET llvm-driver)
154 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-driver)
157 # If Intel JIT events are supported, depend on a tool that tests the listener.
158 if( LLVM_USE_INTEL_JITEVENTS )
159 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-jitlistener)
160 endif( LLVM_USE_INTEL_JITEVENTS )
163 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LLVMgold)
167 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LTO)
170 if(LLVM_BUILD_EXAMPLES)
171 list(APPEND LLVM_TEST_DEPENDS
177 LLJITWithThinLTOSummaries
178 OrcV2CBindingsBasicUsage
179 OrcV2CBindingsAddObjectFile
180 OrcV2CBindingsRemovableCode
182 OrcV2CBindingsVeryLazy
185 list(APPEND LLVM_TEST_DEPENDS
186 LLJITWithRemoteDebugging
190 list(APPEND LLVM_TEST_DEPENDS
197 if(TARGET ocaml_llvm)
198 # Clear all non-OCaml cross-target dependencies when building out-of-tree.
199 if(LLVM_OCAML_OUT_OF_TREE)
200 set(LLVM_TEST_DEPENDS)
203 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS}
205 ocaml_llvm_all_backends
209 ocaml_llvm_executionengine
212 ocaml_llvm_passbuilder
214 ocaml_llvm_transform_utils
218 if (LLVM_INCLUDE_DXIL_TESTS)
219 list(APPEND LLVM_TEST_DEPENDS dxil-dis)
222 if(LLVM_ENABLE_HTTPLIB)
223 list(APPEND LLVM_TEST_DEPENDS llvm-debuginfod)
226 if (LLVM_INCLUDE_SPIRV_TOOLS_TESTS)
227 list(APPEND LLVM_TEST_DEPENDS spirv-dis)
228 list(APPEND LLVM_TEST_DEPENDS spirv-val)
231 add_custom_target(llvm-test-depends DEPENDS ${LLVM_TEST_DEPENDS})
232 set_target_properties(llvm-test-depends PROPERTIES FOLDER "Tests")
235 set(exclude_from_check_all "")
237 set(exclude_from_check_all "EXCLUDE_FROM_CHECK_ALL")
240 add_lit_testsuite(check-llvm "Running the LLVM regression tests"
241 ${CMAKE_CURRENT_BINARY_DIR}
242 ${exclude_from_check_all}
243 DEPENDS ${LLVM_TEST_DEPENDS}
245 set_target_properties(check-llvm PROPERTIES FOLDER "Tests")
247 add_lit_testsuites(LLVM ${CMAKE_CURRENT_SOURCE_DIR}
248 ${exclude_from_check_all}
249 DEPENDS ${LLVM_TEST_DEPENDS}
250 FOLDER "Tests/Subdirectories"
253 # Setup an alias for 'check-all'.
254 add_custom_target(check)
255 add_dependencies(check check-all)
256 set_target_properties(check PROPERTIES FOLDER "Tests")