[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / test / CMakeLists.txt
blob607076b78208ad8435f577d85b3561ca72b50edd
1 llvm_canonicalize_cmake_booleans(
2   BUILD_SHARED_LIBS
3   LLVM_HAVE_LIBXAR
4   HAVE_OCAMLOPT
5   HAVE_OCAML_OUNIT
6   LLVM_ENABLE_DIA_SDK
7   LLVM_ENABLE_FFI
8   LLVM_ENABLE_THREADS
9   LLVM_ENABLE_ZLIB
10   LLVM_ENABLE_LIBXML2
11   LLVM_INCLUDE_GO_TESTS
12   LLVM_LINK_LLVM_DYLIB
13   LLVM_TOOL_LTO_BUILD
14   LLVM_USE_INTEL_JITEVENTS
15   LLVM_BUILD_EXAMPLES
16   LLVM_ENABLE_PLUGINS
17   LLVM_BYE_LINK_INTO_TOOLS
18   LLVM_HAVE_TF_AOT
19   LLVM_HAVE_TF_API
20   LLVM_ENABLE_EXPENSIVE_CHECKS
21   )
23 configure_lit_site_cfg(
24   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
25   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
26   MAIN_CONFIG
27   ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
28   PATHS
29   "CMAKE_OSX_SYSROOT"
30   "LLVM_SOURCE_DIR"
31   "LLVM_BINARY_DIR"
32   "LLVM_TOOLS_DIR"
33   "LLVM_LIBS_DIR"
34   "SHLIBDIR"
35   )
36 configure_lit_site_cfg(
37   ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.py.in
38   ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg.py
39   MAIN_CONFIG
40   ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.cfg.py
41   PATHS
42   "LLVM_SOURCE_DIR"
43   "LLVM_BINARY_DIR"
44   "LLVM_TOOLS_DIR"
45   "SHLIBDIR"
46   )
48 # Set the depends list as a variable so that it can grow conditionally.
49 # NOTE: Sync the substitutions in test/lit.cfg when adding to this list.
50 set(LLVM_TEST_DEPENDS
51           BugpointPasses
52           FileCheck
53           LLVMHello
54           UnitTests
55           bugpoint
56           count
57           llc
58           lli
59           lli-child-target
60           llvm-addr2line
61           llvm-ar
62           llvm-as
63           llvm-bcanalyzer
64           llvm-bitcode-strip
65           llvm-c-test
66           llvm-cat
67           llvm-cfi-verify
68           llvm-config
69           llvm-cov
70           llvm-cvtres
71           llvm-cxxdump
72           llvm-cxxfilt
73           llvm-cxxmap
74           llvm-diff
75           llvm-dis
76           llvm-dlltool
77           dsymutil
78           llvm-dwarfdump
79           llvm-dwp
80           llvm-exegesis
81           llvm-extract
82           llvm-gsymutil
83           llvm-isel-fuzzer
84           llvm-ifs
85           llvm-install-name-tool
86           llvm-jitlink
87           llvm-lib
88           llvm-libtool-darwin
89           llvm-link
90           llvm-lipo
91           llvm-locstats
92           llvm-lto2
93           llvm-mc
94           llvm-mca
95           llvm-ml
96           llvm-modextract
97           llvm-mt
98           llvm-nm
99           llvm-objcopy
100           llvm-objdump
101           llvm-opt-fuzzer
102           llvm-opt-report
103           llvm-otool
104           llvm-pdbutil
105           llvm-profdata
106           llvm-profgen
107           llvm-ranlib
108           llvm-rc
109           llvm-readobj
110           llvm-readelf
111           llvm-reduce
112           llvm-rtdyld
113           llvm-sim
114           llvm-size
115           llvm-split
116           llvm-stress
117           llvm-strings
118           llvm-strip
119           llvm-symbolizer
120           llvm-tblgen
121           llvm-tapi-diff
122           llvm-undname
123           llvm-windres
124           llvm-xray
125           not
126           obj2yaml
127           opt
128           sancov
129           sanstats
130           split-file
131           verify-uselistorder
132           yaml-bench
133           yaml2obj
134         )
136 if(TARGET llvm-lto)
137   set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-lto)
138 endif()
140 # If Intel JIT events are supported, depend on a tool that tests the listener.
141 if( LLVM_USE_INTEL_JITEVENTS )
142   set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-jitlistener)
143 endif( LLVM_USE_INTEL_JITEVENTS )
145 if(TARGET LLVMgold)
146   set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LLVMgold)
147 endif()
149 if(TARGET llvm-go)
150   set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-go)
151 endif()
153 if(TARGET LTO)
154   set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LTO)
155 endif()
157 if(LLVM_BUILD_EXAMPLES)
158   list(APPEND LLVM_TEST_DEPENDS
159     Kaleidoscope-Ch3
160     Kaleidoscope-Ch4
161     Kaleidoscope-Ch5
162     Kaleidoscope-Ch6
163     Kaleidoscope-Ch7
164     LLJITWithThinLTOSummaries
165     OrcV2CBindingsBasicUsage
166     OrcV2CBindingsAddObjectFile
167     OrcV2CBindingsRemovableCode
168     OrcV2CBindingsReflectProcessSymbols
169     OrcV2CBindingsLazy
170     OrcV2CBindingsVeryLazy
171     )
172   if(CMAKE_HOST_UNIX)
173     list(APPEND LLVM_TEST_DEPENDS
174       LLJITWithRemoteDebugging
175       )
176   endif()
177   if (NOT WIN32)
178     list(APPEND LLVM_TEST_DEPENDS
179       Bye
180       )
181   endif()
182 endif()
184 if(TARGET ocaml_llvm)
185   # Clear all non-OCaml cross-target dependencies when building out-of-tree.
186   if(LLVM_OCAML_OUT_OF_TREE)
187     set(LLVM_TEST_DEPENDS)
188   endif()
190   set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS}
191           ocaml_llvm
192           ocaml_llvm_all_backends
193           ocaml_llvm_analysis
194           ocaml_llvm_bitreader
195           ocaml_llvm_bitwriter
196           ocaml_llvm_executionengine
197           ocaml_llvm_irreader
198           ocaml_llvm_linker
199           ocaml_llvm_target
200           ocaml_llvm_ipo
201           ocaml_llvm_passmgr_builder
202           ocaml_llvm_scalar_opts
203           ocaml_llvm_transform_utils
204           ocaml_llvm_vectorize
205         )
206 endif()
208 add_custom_target(llvm-test-depends DEPENDS ${LLVM_TEST_DEPENDS})
209 set_target_properties(llvm-test-depends PROPERTIES FOLDER "Tests")
211 if(LLVM_BUILD_TOOLS)
212   set(exclude_from_check_all "")
213 else()
214   set(exclude_from_check_all "EXCLUDE_FROM_CHECK_ALL")
215 endif()
217 add_lit_testsuite(check-llvm "Running the LLVM regression tests"
218   ${CMAKE_CURRENT_BINARY_DIR}
219   ${exclude_from_check_all}
220   DEPENDS ${LLVM_TEST_DEPENDS}
221   )
222 set_target_properties(check-llvm PROPERTIES FOLDER "Tests")
224 add_lit_testsuites(LLVM ${CMAKE_CURRENT_SOURCE_DIR}
225   ${exclude_from_check_all}
226   DEPENDS ${LLVM_TEST_DEPENDS}
227   )
229 # Setup an alias for 'check-all'.
230 add_custom_target(check)
231 add_dependencies(check check-all)
232 set_target_properties(check PROPERTIES FOLDER "Tests")