mirror of
https://github.com/open-goal/jak-project
synced 2026-09-11 12:35:25 -04:00
bfc4c18ada
- 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
22 lines
709 B
CMake
Vendored
Generated
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()
|