2015-08-27 22:31:44 +02:00
|
|
|
if(LLVM_BUILD_EXAMPLES)
|
|
|
|
set(ENABLE_EXAMPLES 1)
|
|
|
|
endif()
|
|
|
|
|
2012-06-28 08:36:24 +02:00
|
|
|
configure_lit_site_cfg(
|
2011-11-05 00:04:05 +01:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
2012-06-28 08:36:24 +02:00
|
|
|
)
|
|
|
|
configure_lit_site_cfg(
|
2011-11-05 00:04:05 +01:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
|
2012-06-28 08:36:24 +02:00
|
|
|
)
|
2009-09-22 09:38:44 +02:00
|
|
|
|
2012-10-10 15:33:00 +02: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-21 21:38:26 +01:00
|
|
|
# Set the depends list as a variable so that it can grow conditionally.
|
2013-10-29 00:37:49 +01:00
|
|
|
# NOTE: Sync the substitutions in test/lit.cfg when adding to this list.
|
2013-07-08 10:44:30 +02:00
|
|
|
set(LLVM_TEST_DEPENDS
|
|
|
|
BugpointPasses
|
2015-11-12 20:34:21 +01:00
|
|
|
FileCheck
|
2013-07-08 10:44:30 +02:00
|
|
|
LLVMHello
|
2015-11-12 20:34:21 +01:00
|
|
|
UnitTests
|
2014-03-04 17:13:30 +01:00
|
|
|
bugpoint
|
2015-11-12 20:34:21 +01:00
|
|
|
count
|
2013-07-08 10:44:30 +02:00
|
|
|
llc
|
|
|
|
lli
|
2013-10-03 00:27:23 +02:00
|
|
|
lli-child-target
|
2013-07-08 10:44:30 +02:00
|
|
|
llvm-ar
|
|
|
|
llvm-as
|
|
|
|
llvm-bcanalyzer
|
2013-10-23 19:57:04 +02:00
|
|
|
llvm-c-test
|
2015-11-12 20:34:21 +01:00
|
|
|
llvm-config
|
2013-07-08 10:44:36 +02:00
|
|
|
llvm-cov
|
2015-03-15 02:30:58 +01:00
|
|
|
llvm-cxxdump
|
2013-07-08 10:44:30 +02:00
|
|
|
llvm-diff
|
|
|
|
llvm-dis
|
2014-12-12 18:31:24 +01:00
|
|
|
llvm-dsymutil
|
2013-07-08 10:44:30 +02:00
|
|
|
llvm-dwarfdump
|
2015-12-01 01:57:05 +01:00
|
|
|
llvm-dwp
|
2014-10-23 04:33:23 +02:00
|
|
|
llvm-extract
|
2015-06-09 23:50:22 +02:00
|
|
|
llvm-lib
|
2012-11-01 03:13:50 +01:00
|
|
|
llvm-link
|
2016-08-11 16:58:12 +02:00
|
|
|
llvm-lto2
|
2012-11-01 03:13:50 +01:00
|
|
|
llvm-mc
|
|
|
|
llvm-mcmarkup
|
|
|
|
llvm-nm
|
|
|
|
llvm-objdump
|
2015-10-15 15:22:38 +02:00
|
|
|
llvm-pdbdump
|
2014-02-18 00:22:49 +01:00
|
|
|
llvm-profdata
|
2014-12-04 02:34:11 +01:00
|
|
|
llvm-ranlib
|
2012-11-01 03:13:50 +01:00
|
|
|
llvm-readobj
|
2013-01-26 00:24:07 +01:00
|
|
|
llvm-rtdyld
|
2014-12-04 02:27:53 +01:00
|
|
|
llvm-size
|
2015-08-21 04:48:20 +02:00
|
|
|
llvm-split
|
2013-03-13 10:35:18 +01:00
|
|
|
llvm-symbolizer
|
2014-01-18 20:01:08 +01:00
|
|
|
llvm-tblgen
|
2013-07-08 10:44:30 +02:00
|
|
|
not
|
|
|
|
obj2yaml
|
2015-11-12 20:34:21 +01:00
|
|
|
opt
|
|
|
|
sancov
|
2016-01-16 01:31:11 +01:00
|
|
|
sanstats
|
2014-07-30 19:11:27 +02:00
|
|
|
verify-uselistorder
|
2015-11-12 20:34:21 +01:00
|
|
|
yaml-bench
|
|
|
|
yaml2obj
|
2013-07-08 10:44:30 +02:00
|
|
|
)
|
2012-11-21 21:38:26 +01:00
|
|
|
|
2016-06-02 18:29:07 +02:00
|
|
|
if(TARGET llvm-lto)
|
|
|
|
set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-lto)
|
|
|
|
endif()
|
|
|
|
|
2012-11-21 21:38:26 +01: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 00:20:49 +02:00
|
|
|
if(TARGET LLVMgold)
|
|
|
|
set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LLVMgold)
|
|
|
|
endif()
|
|
|
|
|
2014-10-23 21:51:40 +02:00
|
|
|
if(TARGET llvm-go)
|
|
|
|
set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-go)
|
|
|
|
endif()
|
|
|
|
|
2016-06-02 18:29:07 +02:00
|
|
|
if(TARGET LTO)
|
2015-03-20 00:55:38 +01:00
|
|
|
set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LTO)
|
|
|
|
endif()
|
|
|
|
|
2014-12-01 20:50:23 +01: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-01 20:50:39 +01:00
|
|
|
ocaml_llvm_transform_utils
|
2014-12-01 20:50:23 +01:00
|
|
|
ocaml_llvm_vectorize
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2015-08-27 22:31:44 +02:00
|
|
|
if(LLVM_BUILD_EXAMPLES)
|
|
|
|
list(APPEND LLVM_TEST_DEPENDS
|
|
|
|
Kaleidoscope-Ch3
|
|
|
|
Kaleidoscope-Ch4
|
|
|
|
Kaleidoscope-Ch5
|
|
|
|
Kaleidoscope-Ch6
|
|
|
|
Kaleidoscope-Ch7
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2016-03-02 01:27:14 +01:00
|
|
|
add_custom_target(llvm-test-depends DEPENDS ${LLVM_TEST_DEPENDS})
|
2016-04-12 17:09:14 +02:00
|
|
|
set_target_properties(llvm-test-depends PROPERTIES FOLDER "Tests")
|
2016-03-02 01:27:14 +01:00
|
|
|
|
2012-11-21 21:38:26 +01: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 11:44:16 +02:00
|
|
|
)
|
2012-06-30 12:14:14 +02:00
|
|
|
set_target_properties(check-llvm PROPERTIES FOLDER "Tests")
|
2010-12-10 03:15:36 +01:00
|
|
|
|
2015-03-25 09:07:47 +01:00
|
|
|
add_lit_testsuites(LLVM ${CMAKE_CURRENT_SOURCE_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 11:44:16 +02: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-02 23:45:22 +02:00
|
|
|
add_custom_target(check)
|
|
|
|
add_dependencies(check check-llvm)
|
2012-06-30 12:14:14 +02:00
|
|
|
set_target_properties(check PROPERTIES FOLDER "Tests")
|