2012-06-28 14:36:24 +08:00
|
|
|
configure_lit_site_cfg(
|
2011-11-05 07:04:05 +08:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
2012-06-28 14:36:24 +08:00
|
|
|
)
|
|
|
|
configure_lit_site_cfg(
|
2011-11-05 07:04:05 +08:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
|
2012-06-28 14:36:24 +08:00
|
|
|
)
|
2009-09-22 15:38:44 +08:00
|
|
|
|
2012-10-10 21:33:00 +08:00
|
|
|
# Don't include check-llvm into check-all without LLVM_BUILD_TOOLS.
|
|
|
|
if(NOT LLVM_BUILD_TOOLS)
|
|
|
|
set(EXCLUDE_FROM_ALL ON)
|
|
|
|
endif()
|
|
|
|
|
2012-11-22 04:38:26 +08:00
|
|
|
# Set the depends list as a variable so that it can grow conditionally.
|
2013-10-29 07:37:49 +08:00
|
|
|
# NOTE: Sync the substitutions in test/lit.cfg when adding to this list.
|
2013-07-08 16:44:30 +08:00
|
|
|
set(LLVM_TEST_DEPENDS
|
2013-12-04 07:22:25 +08:00
|
|
|
llvm-config
|
2013-07-08 16:44:30 +08:00
|
|
|
UnitTests
|
|
|
|
BugpointPasses
|
|
|
|
LLVMHello
|
2014-03-05 00:13:30 +08:00
|
|
|
bugpoint
|
2013-07-08 16:44:30 +08:00
|
|
|
llc
|
|
|
|
lli
|
2013-10-03 06:27:23 +08:00
|
|
|
lli-child-target
|
2013-07-08 16:44:30 +08:00
|
|
|
llvm-ar
|
|
|
|
llvm-as
|
|
|
|
llvm-bcanalyzer
|
2013-10-24 01:57:04 +08:00
|
|
|
llvm-c-test
|
2013-07-08 16:44:36 +08:00
|
|
|
llvm-cov
|
2013-07-08 16:44:30 +08:00
|
|
|
llvm-diff
|
|
|
|
llvm-dis
|
2014-12-13 01:31:24 +08:00
|
|
|
llvm-dsymutil
|
2013-07-08 16:44:30 +08:00
|
|
|
llvm-dwarfdump
|
2014-10-23 10:33:23 +08:00
|
|
|
llvm-extract
|
2012-11-01 10:13:50 +08:00
|
|
|
llvm-link
|
2013-10-03 06:27:23 +08:00
|
|
|
llvm-lto
|
2012-11-01 10:13:50 +08:00
|
|
|
llvm-mc
|
|
|
|
llvm-mcmarkup
|
|
|
|
llvm-nm
|
|
|
|
llvm-objdump
|
2014-02-18 07:22:49 +08:00
|
|
|
llvm-profdata
|
2014-12-04 09:34:11 +08:00
|
|
|
llvm-ranlib
|
2012-11-01 10:13:50 +08:00
|
|
|
llvm-readobj
|
2013-01-26 07:24:07 +08:00
|
|
|
llvm-rtdyld
|
2014-12-04 09:27:53 +08:00
|
|
|
llvm-size
|
2013-03-13 17:35:18 +08:00
|
|
|
llvm-symbolizer
|
2014-01-19 03:01:08 +08:00
|
|
|
llvm-tblgen
|
2014-07-25 07:26:54 +08:00
|
|
|
llvm-vtabledump
|
2013-07-08 16:44:30 +08:00
|
|
|
macho-dump
|
|
|
|
opt
|
|
|
|
FileCheck
|
|
|
|
count
|
|
|
|
not
|
|
|
|
yaml2obj
|
|
|
|
obj2yaml
|
2014-07-31 01:11:27 +08:00
|
|
|
verify-uselistorder
|
2013-07-08 16:44:30 +08:00
|
|
|
)
|
2012-11-22 04:38:26 +08:00
|
|
|
|
|
|
|
# If Intel JIT events are supported, depend on a tool that tests the listener.
|
|
|
|
if( LLVM_USE_INTEL_JITEVENTS )
|
|
|
|
set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-jitlistener)
|
|
|
|
endif( LLVM_USE_INTEL_JITEVENTS )
|
|
|
|
|
2014-09-11 06:20:49 +08:00
|
|
|
if(TARGET LLVMgold)
|
|
|
|
set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LLVMgold)
|
|
|
|
endif()
|
|
|
|
|
2014-10-24 03:51:40 +08:00
|
|
|
if(TARGET llvm-go)
|
|
|
|
set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-go)
|
|
|
|
endif()
|
|
|
|
|
2014-12-02 03:50:23 +08:00
|
|
|
if(TARGET ocaml_llvm)
|
|
|
|
set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS}
|
|
|
|
ocaml_llvm
|
|
|
|
ocaml_llvm_all_backends
|
|
|
|
ocaml_llvm_analysis
|
|
|
|
ocaml_llvm_bitreader
|
|
|
|
ocaml_llvm_bitwriter
|
|
|
|
ocaml_llvm_executionengine
|
|
|
|
ocaml_llvm_irreader
|
|
|
|
ocaml_llvm_linker
|
|
|
|
ocaml_llvm_target
|
|
|
|
ocaml_llvm_ipo
|
|
|
|
ocaml_llvm_passmgr_builder
|
|
|
|
ocaml_llvm_scalar_opts
|
2014-12-02 03:50:39 +08:00
|
|
|
ocaml_llvm_transform_utils
|
2014-12-02 03:50:23 +08:00
|
|
|
ocaml_llvm_vectorize
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2012-11-22 04:38:26 +08:00
|
|
|
add_lit_testsuite(check-llvm "Running the LLVM regression tests"
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
PARAMS llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
|
|
|
llvm_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
|
|
|
|
DEPENDS ${LLVM_TEST_DEPENDS}
|
2012-06-27 17:44:16 +08:00
|
|
|
)
|
2012-06-30 18:14:14 +08:00
|
|
|
set_target_properties(check-llvm PROPERTIES FOLDER "Tests")
|
2010-12-10 10:15:36 +08:00
|
|
|
|
2012-06-27 17:44:16 +08:00
|
|
|
# Setup a legacy alias for 'check-llvm'. This will likely change to be an
|
|
|
|
# alias for 'check-all' at some point in the future.
|
2012-07-03 05:45:22 +08:00
|
|
|
add_custom_target(check)
|
|
|
|
add_dependencies(check check-llvm)
|
2012-06-30 18:14:14 +08:00
|
|
|
set_target_properties(check PROPERTIES FOLDER "Tests")
|