1 llvm_canonicalize_cmake_booleans(
6 LLVM_USE_INTEL_JITEVENTS
16 configure_lit_site_cfg(
17 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
18 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
20 ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
22 configure_lit_site_cfg(
23 ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.py.in
24 ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg.py
26 ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.cfg.py
29 # Don't include check-llvm into check-all without LLVM_BUILD_TOOLS.
30 if(NOT LLVM_BUILD_TOOLS)
31 set(EXCLUDE_FROM_ALL ON)
34 # Set the depends list as a variable so that it can grow conditionally.
35 # NOTE: Sync the substitutions in test/lit.cfg when adding to this list.
106 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-lto)
109 # If Intel JIT events are supported, depend on a tool that tests the listener.
110 if( LLVM_USE_INTEL_JITEVENTS )
111 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-jitlistener)
112 endif( LLVM_USE_INTEL_JITEVENTS )
115 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LLVMgold)
119 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-go)
123 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LTO)
126 if(LLVM_BUILD_EXAMPLES)
127 list(APPEND LLVM_TEST_DEPENDS
136 if(TARGET ocaml_llvm)
137 # Clear all non-OCaml cross-target dependencies when building out-of-tree.
138 if(LLVM_OCAML_OUT_OF_TREE)
139 set(LLVM_TEST_DEPENDS)
142 set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS}
144 ocaml_llvm_all_backends
148 ocaml_llvm_executionengine
153 ocaml_llvm_passmgr_builder
154 ocaml_llvm_scalar_opts
155 ocaml_llvm_transform_utils
160 add_custom_target(llvm-test-depends DEPENDS ${LLVM_TEST_DEPENDS})
161 set_target_properties(llvm-test-depends PROPERTIES FOLDER "Tests")
163 add_lit_testsuite(check-llvm "Running the LLVM regression tests"
164 ${CMAKE_CURRENT_BINARY_DIR}
165 DEPENDS ${LLVM_TEST_DEPENDS}
167 set_target_properties(check-llvm PROPERTIES FOLDER "Tests")
169 add_lit_testsuites(LLVM ${CMAKE_CURRENT_SOURCE_DIR}
170 DEPENDS ${LLVM_TEST_DEPENDS}
173 # Setup a legacy alias for 'check-llvm'. This will likely change to be an
174 # alias for 'check-all' at some point in the future.
175 add_custom_target(check)
176 add_dependencies(check check-llvm)
177 set_target_properties(check PROPERTIES FOLDER "Tests")