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.
112 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-lto)
115 # If Intel JIT events are supported, depend on a tool that tests the listener.
116 if( LLVM_USE_INTEL_JITEVENTS )
117 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-jitlistener)
118 endif( LLVM_USE_INTEL_JITEVENTS )
121 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LLVMgold)
125 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-go)
129 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LTO)
132 if(LLVM_BUILD_EXAMPLES)
133 list(APPEND LLVM_TEST_DEPENDS
142 if(TARGET ocaml_llvm)
143 # Clear all non-OCaml cross-target dependencies when building out-of-tree.
144 if(LLVM_OCAML_OUT_OF_TREE)
145 set(LLVM_TEST_DEPENDS)
148 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS}
150 ocaml_llvm_all_backends
154 ocaml_llvm_executionengine
159 ocaml_llvm_passmgr_builder
160 ocaml_llvm_scalar_opts
161 ocaml_llvm_transform_utils
166 add_custom_target(llvm-test-depends DEPENDS ${LLVM_TEST_DEPENDS})
167 set_target_properties(llvm-test-depends PROPERTIES FOLDER "Tests")
169 add_lit_testsuite(check-llvm "Running the LLVM regression tests"
170 ${CMAKE_CURRENT_BINARY_DIR}
171 DEPENDS ${LLVM_TEST_DEPENDS}
173 set_target_properties(check-llvm PROPERTIES FOLDER "Tests")
175 add_lit_testsuites(LLVM ${CMAKE_CURRENT_SOURCE_DIR}
176 DEPENDS ${LLVM_TEST_DEPENDS}
179 # Setup a legacy alias for 'check-llvm'. This will likely change to be an
180 # alias for 'check-all' at some point in the future.
181 add_custom_target(check)
182 add_dependencies(check check-llvm)
183 set_target_properties(check PROPERTIES FOLDER "Tests")