llvm-project/bolt/test/CMakeLists.txt

54 lines
1.1 KiB
CMake

llvm_canonicalize_cmake_booleans(
BOLT_ENABLE_RUNTIME
)
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
MAIN_CONFIG
${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
)
set(BOLT_TEST_PARAMS
bolt_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
)
list(APPEND BOLT_TEST_DEPS
clang
count
FileCheck
llc
lld
llvm-config
llvm-bolt
llvm-boltdiff
llvm-dwarfdump
llvm-mc
llvm-nm
llvm-objdump
llvm-readelf
llvm-readobj
llvm-strip
llvm-objcopy
merge-fdata
not
perf2bolt
yaml2obj
)
add_custom_target(bolt-test-depends DEPENDS ${BOLT_TEST_DEPS})
set_target_properties(bolt-test-depends PROPERTIES FOLDER "BOLT")
add_lit_testsuite(check-bolt "Running the BOLT regression tests"
${CMAKE_CURRENT_BINARY_DIR}
PARAMS ${BOLT_TEST_PARAMS}
DEPENDS ${BOLT_TEST_DEPS}
ARGS ${BOLT_TEST_EXTRA_ARGS}
)
set_target_properties(check-bolt PROPERTIES FOLDER "BOLT")
add_lit_testsuites(BOLT ${CMAKE_CURRENT_SOURCE_DIR}
PARAMS ${BOLT_TEST_PARAMS}
DEPENDS ${BOLT_TEST_DEPS}
)