llvm-project/mlir/test/CMakeLists.txt

49 lines
985 B
CMake
Raw Normal View History

llvm_canonicalize_cmake_booleans(
LLVM_BUILD_EXAMPLES
)
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
)
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.py.in
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg.py
MAIN_CONFIG
${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.cfg.py
)
set(MLIR_TEST_DEPENDS
FileCheck count not
MLIRUnitTests
mlir-cpu-runner
mlir-opt
mlir-tblgen
mlir-translate
)
if(LLVM_BUILD_EXAMPLES)
list(APPEND MLIR_TEST_DEPENDS
linalg1-opt
toyc-ch1
toyc-ch2
toyc-ch3
toyc-ch4
toyc-ch5
)
endif()
add_lit_testsuite(check-mlir "Running the MLIR regression tests"
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${MLIR_TEST_DEPENDS}
)
set_target_properties(check-mlir PROPERTIES FOLDER "Tests")
add_lit_testsuites(MLIR ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${MLIR_TEST_DEPS}
)