Files
jak-project/third-party/capstone/tests/unit/CMakeLists.txt
Tyler Wilding bfc4c18ada goalc: replicate tests for the majority of ARM64 non-simd cases (#4377)
- Adds `capstone` as a disassembling library that could eventually
replace Zydis (for now left that alone)
- Replicates all of the existing x86 tests to ARM64, fixed a bunch of
underlying issues along the way
- There are a very small handful of tests remaining that need to be
enabled / fixed
2026-08-16 15:34:37 -04:00

22 lines
709 B
CMake
Vendored
Generated

cmake_minimum_required(VERSION 3.15)
enable_testing()
set(UNIT_TEST_SOURCES sstream.c utils.c)
if(CAPSTONE_RISCV_SUPPORT)
list(APPEND UNIT_TEST_SOURCES riscv_op_count_iter.c riscv_sysreg.c riscv_reg_access.c riscv_insn_name_segv.c)
endif()
if(CAPSTONE_M68K_SUPPORT)
list(APPEND UNIT_TEST_SOURCES m68k_insn_name_segv.c)
endif()
if(CAPSTONE_WASM_SUPPORT)
list(APPEND UNIT_TEST_SOURCES wasm_brtable_size.c)
endif()
include_directories(include)
foreach(TSRC ${UNIT_TEST_SOURCES})
string(REGEX REPLACE ".c$" "" TBIN ${TSRC})
add_executable(${TBIN} "${TESTS_UNIT_DIR}/${TSRC}")
target_link_libraries(${TBIN} PRIVATE capstone)
add_test(NAME "unit_${TBIN}" COMMAND ${TBIN})
endforeach()