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.
114 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-lto)
117 # If Intel JIT events are supported, depend on a tool that tests the listener.
118 if( LLVM_USE_INTEL_JITEVENTS )
119 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-jitlistener)
120 endif( LLVM_USE_INTEL_JITEVENTS )
123 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LLVMgold)
127 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-go)
131 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LTO)
134 if(LLVM_BUILD_EXAMPLES)
135 list(APPEND LLVM_TEST_DEPENDS
144 if(TARGET ocaml_llvm)
145 # Clear all non-OCaml cross-target dependencies when building out-of-tree.
146 if(LLVM_OCAML_OUT_OF_TREE)
147 set(LLVM_TEST_DEPENDS)
150 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS}
152 ocaml_llvm_all_backends
156 ocaml_llvm_executionengine
161 ocaml_llvm_passmgr_builder
162 ocaml_llvm_scalar_opts
163 ocaml_llvm_transform_utils
168 add_custom_target(llvm-test-depends DEPENDS ${LLVM_TEST_DEPENDS})
169 set_target_properties(llvm-test-depends PROPERTIES FOLDER "Tests")
171 add_lit_testsuite(check-llvm "Running the LLVM regression tests"
172 ${CMAKE_CURRENT_BINARY_DIR}
173 DEPENDS ${LLVM_TEST_DEPENDS}
175 set_target_properties(check-llvm PROPERTIES FOLDER "Tests")
177 add_lit_testsuites(LLVM ${CMAKE_CURRENT_SOURCE_DIR}
178 DEPENDS ${LLVM_TEST_DEPENDS}
181 # Setup a legacy alias for 'check-llvm'. This will likely change to be an
182 # alias for 'check-all' at some point in the future.
183 add_custom_target(check)
184 add_dependencies(check check-llvm)
185 set_target_properties(check PROPERTIES FOLDER "Tests")