pineapple/externals/dynarmic/tests/CMakeLists.txt

93 lines
2.5 KiB
CMake
Raw Normal View History

2020-12-28 16:15:37 +01:00
add_executable(dynarmic_tests
fp/FPToFixed.cpp
fp/FPValue.cpp
fp/mantissa_util_tests.cpp
fp/unpacked_tests.cpp
main.cpp
rand_int.h
)
2022-06-22 03:30:11 +02:00
if ("A32" IN_LIST DYNARMIC_FRONTENDS)
target_sources(dynarmic_tests PRIVATE
A32/test_arm_disassembler.cpp
A32/test_arm_instructions.cpp
A32/test_thumb_instructions.cpp
A32/testenv.h
decoder_tests.cpp
)
endif()
if ("A64" IN_LIST DYNARMIC_FRONTENDS)
2021-05-30 08:36:49 +02:00
target_sources(dynarmic_tests PRIVATE
2022-06-22 03:30:11 +02:00
A64/a64.cpp
A64/testenv.h
2021-05-30 08:36:49 +02:00
)
endif()
2020-12-28 16:15:37 +01:00
if (DYNARMIC_TESTS_USE_UNICORN)
2022-06-22 03:30:11 +02:00
target_link_libraries(dynarmic_tests PRIVATE Unicorn::Unicorn)
2020-12-28 16:15:37 +01:00
target_sources(dynarmic_tests PRIVATE
fuzz_util.cpp
fuzz_util.h
)
2022-06-22 03:30:11 +02:00
if ("A32" IN_LIST DYNARMIC_FRONTENDS)
target_sources(dynarmic_tests PRIVATE
A32/fuzz_arm.cpp
A32/fuzz_thumb.cpp
unicorn_emu/a32_unicorn.cpp
unicorn_emu/a32_unicorn.h
)
endif()
if ("A64" IN_LIST DYNARMIC_FRONTENDS)
target_sources(dynarmic_tests PRIVATE
A64/fuzz_with_unicorn.cpp
A64/misaligned_page_table.cpp
A64/verify_unicorn.cpp
unicorn_emu/a64_unicorn.cpp
unicorn_emu/a64_unicorn.h
)
endif()
2020-12-28 16:15:37 +01:00
endif()
2022-06-22 03:30:11 +02:00
if (ARCHITECTURE STREQUAL "x86_64")
target_link_libraries(dynarmic_tests PRIVATE xbyak)
target_sources(dynarmic_tests PRIVATE
x64_cpu_info.cpp
)
if (NOT MSVC)
target_sources(dynarmic_tests PRIVATE
rsqrt_test.cpp
rsqrt_test_fn.s
)
endif()
endif()
2020-12-28 16:15:37 +01:00
include(CreateDirectoryGroups)
2022-06-22 03:30:11 +02:00
if (("A32" IN_LIST DYNARMIC_FRONTENDS) AND ("A64" IN_LIST DYNARMIC_FRONTENDS))
add_executable(dynarmic_print_info
print_info.cpp
)
create_target_directory_groups(dynarmic_print_info)
target_link_libraries(dynarmic_print_info PRIVATE dynarmic boost catch fmt)
target_include_directories(dynarmic_print_info PRIVATE . ../src)
target_compile_options(dynarmic_print_info PRIVATE ${DYNARMIC_CXX_FLAGS})
target_compile_definitions(dynarmic_print_info PRIVATE FMT_USE_USER_DEFINED_LITERALS=1)
endif()
2020-12-28 16:15:37 +01:00
create_target_directory_groups(dynarmic_tests)
2022-06-22 03:30:11 +02:00
target_link_libraries(dynarmic_tests PRIVATE dynarmic boost catch fmt)
2020-12-28 16:15:37 +01:00
target_include_directories(dynarmic_tests PRIVATE . ../src)
target_compile_options(dynarmic_tests PRIVATE ${DYNARMIC_CXX_FLAGS})
2021-06-24 01:31:27 +02:00
target_compile_definitions(dynarmic_tests PRIVATE FMT_USE_USER_DEFINED_LITERALS=1 CATCH_CONFIG_ENABLE_BENCHMARKING=1)
2020-12-28 16:15:37 +01:00
2021-06-06 02:35:33 +02:00
add_test(dynarmic_tests dynarmic_tests --durations yes)