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
32 configure_lit_site_cfg(
33 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
34 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
36 ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
45 configure_lit_site_cfg(
46 ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.py.in
47 ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg.py
49 ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.cfg.py
57 # Set the depends list as a variable so that it can grow conditionally.
58 # NOTE: Sync the substitutions in test/lit.cfg when adding to this list.
83 llvm-debuginfo-analyzer
97 llvm-install-name-tool
151 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-lto)
154 if(TARGET llvm-driver)
155 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-driver)
158 # If Intel JIT events are supported, depend on a tool that tests the listener.
159 if( LLVM_USE_INTEL_JITEVENTS )
160 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-jitlistener)
161 endif( LLVM_USE_INTEL_JITEVENTS )
164 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LLVMgold)
168 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LTO)
171 if(LLVM_BUILD_EXAMPLES)
172 list(APPEND LLVM_TEST_DEPENDS
178 LLJITWithThinLTOSummaries
179 OrcV2CBindingsBasicUsage
180 OrcV2CBindingsAddObjectFile
181 OrcV2CBindingsRemovableCode
183 OrcV2CBindingsVeryLazy
186 list(APPEND LLVM_TEST_DEPENDS
187 LLJITWithRemoteDebugging
191 list(APPEND LLVM_TEST_DEPENDS
198 if(TARGET ocaml_llvm)
199 # Clear all non-OCaml cross-target dependencies when building out-of-tree.
200 if(LLVM_OCAML_OUT_OF_TREE)
201 set(LLVM_TEST_DEPENDS)
204 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS}
206 ocaml_llvm_all_backends
210 ocaml_llvm_executionengine
213 ocaml_llvm_passbuilder
215 ocaml_llvm_transform_utils
219 if (LLVM_INCLUDE_DXIL_TESTS)
220 list(APPEND LLVM_TEST_DEPENDS dxil-dis)
223 if(LLVM_ENABLE_HTTPLIB)
224 list(APPEND LLVM_TEST_DEPENDS llvm-debuginfod)
227 if (LLVM_INCLUDE_SPIRV_TOOLS_TESTS)
228 list(APPEND LLVM_TEST_DEPENDS spirv-dis)
229 list(APPEND LLVM_TEST_DEPENDS spirv-val)
232 add_custom_target(llvm-test-depends DEPENDS ${LLVM_TEST_DEPENDS})
233 set_target_properties(llvm-test-depends PROPERTIES FOLDER "LLVM/Tests")
236 set(exclude_from_check_all "")
238 set(exclude_from_check_all "EXCLUDE_FROM_CHECK_ALL")
241 add_lit_testsuite(check-llvm "Running the LLVM regression tests"
242 ${CMAKE_CURRENT_BINARY_DIR}
243 ${exclude_from_check_all}
244 DEPENDS ${LLVM_TEST_DEPENDS}
246 set_target_properties(check-llvm PROPERTIES FOLDER "LLVM/Tests")
248 add_lit_testsuites(LLVM ${CMAKE_CURRENT_SOURCE_DIR}
249 ${exclude_from_check_all}
250 DEPENDS ${LLVM_TEST_DEPENDS}
251 FOLDER "Tests/Subdirectories"
254 # Setup an alias for 'check-all'.
255 add_custom_target(check)
256 add_dependencies(check check-all)
257 set_target_properties(check PROPERTIES FOLDER "LLVM/Tests")