1 llvm_canonicalize_cmake_booleans(
14 LLVM_USE_INTEL_JITEVENTS
19 configure_lit_site_cfg(
20 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
21 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
23 ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
25 configure_lit_site_cfg(
26 ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.py.in
27 ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg.py
29 ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.cfg.py
32 # Don't include check-llvm into check-all without LLVM_BUILD_TOOLS.
33 if(NOT LLVM_BUILD_TOOLS)
34 set(EXCLUDE_FROM_ALL ON)
37 # Set the depends list as a variable so that it can grow conditionally.
38 # NOTE: Sync the substitutions in test/lit.cfg when adding to this list.
113 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-lto)
116 # If Intel JIT events are supported, depend on a tool that tests the listener.
117 if( LLVM_USE_INTEL_JITEVENTS )
118 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-jitlistener)
119 endif( LLVM_USE_INTEL_JITEVENTS )
122 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LLVMgold)
126 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-go)
130 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LTO)
133 if(LLVM_BUILD_EXAMPLES)
134 list(APPEND LLVM_TEST_DEPENDS
143 if(TARGET ocaml_llvm)
144 # Clear all non-OCaml cross-target dependencies when building out-of-tree.
145 if(LLVM_OCAML_OUT_OF_TREE)
146 set(LLVM_TEST_DEPENDS)
149 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS}
151 ocaml_llvm_all_backends
155 ocaml_llvm_executionengine
160 ocaml_llvm_passmgr_builder
161 ocaml_llvm_scalar_opts
162 ocaml_llvm_transform_utils
167 add_custom_target(llvm-test-depends DEPENDS ${LLVM_TEST_DEPENDS})
168 set_target_properties(llvm-test-depends PROPERTIES FOLDER "Tests")
170 add_lit_testsuite(check-llvm "Running the LLVM regression tests"
171 ${CMAKE_CURRENT_BINARY_DIR}
172 DEPENDS ${LLVM_TEST_DEPENDS}
174 set_target_properties(check-llvm PROPERTIES FOLDER "Tests")
176 add_lit_testsuites(LLVM ${CMAKE_CURRENT_SOURCE_DIR}
177 DEPENDS ${LLVM_TEST_DEPENDS}
180 # Setup a legacy alias for 'check-llvm'. This will likely change to be an
181 # alias for 'check-all' at some point in the future.
182 add_custom_target(check)
183 add_dependencies(check check-llvm)
184 set_target_properties(check PROPERTIES FOLDER "Tests")