1 llvm_canonicalize_cmake_booleans(
14 LLVM_USE_INTEL_JITEVENTS
17 configure_lit_site_cfg(
18 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
19 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
21 ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
23 configure_lit_site_cfg(
24 ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.py.in
25 ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg.py
27 ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.cfg.py
30 # Don't include check-llvm into check-all without LLVM_BUILD_TOOLS.
31 if(NOT LLVM_BUILD_TOOLS)
32 set(EXCLUDE_FROM_ALL ON)
35 # Set the depends list as a variable so that it can grow conditionally.
36 # NOTE: Sync the substitutions in test/lit.cfg when adding to this list.
107 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-lto)
110 # If Intel JIT events are supported, depend on a tool that tests the listener.
111 if( LLVM_USE_INTEL_JITEVENTS )
112 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-jitlistener)
113 endif( LLVM_USE_INTEL_JITEVENTS )
116 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LLVMgold)
120 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-go)
124 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LTO)
127 if(LLVM_BUILD_EXAMPLES)
128 list(APPEND LLVM_TEST_DEPENDS
137 if(TARGET ocaml_llvm)
138 # Clear all non-OCaml cross-target dependencies when building out-of-tree.
139 if(LLVM_OCAML_OUT_OF_TREE)
140 set(LLVM_TEST_DEPENDS)
143 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS}
145 ocaml_llvm_all_backends
149 ocaml_llvm_executionengine
154 ocaml_llvm_passmgr_builder
155 ocaml_llvm_scalar_opts
156 ocaml_llvm_transform_utils
161 add_custom_target(llvm-test-depends DEPENDS ${LLVM_TEST_DEPENDS})
162 set_target_properties(llvm-test-depends PROPERTIES FOLDER "Tests")
164 add_lit_testsuite(check-llvm "Running the LLVM regression tests"
165 ${CMAKE_CURRENT_BINARY_DIR}
166 DEPENDS ${LLVM_TEST_DEPENDS}
168 set_target_properties(check-llvm PROPERTIES FOLDER "Tests")
170 add_lit_testsuites(LLVM ${CMAKE_CURRENT_SOURCE_DIR}
171 DEPENDS ${LLVM_TEST_DEPENDS}
174 # Setup a legacy alias for 'check-llvm'. This will likely change to be an
175 # alias for 'check-all' at some point in the future.
176 add_custom_target(check)
177 add_dependencies(check check-llvm)
178 set_target_properties(check PROPERTIES FOLDER "Tests")