mach-detours/tests/CMakeLists.txt

24 lines
760 B
Text
Raw Normal View History

2025-10-01 23:55:17 +02:00
# Copyright (c) Lysann Tranvouez. All rights reserved.
2025-10-01 23:07:06 +02:00
add_executable(mach_detours_tests
test_dylib_function.cpp
test_local_function.cpp
2025-10-02 22:41:33 +02:00
test_system_function.cpp
2025-10-03 00:04:52 +02:00
test_threads.cpp
2025-10-02 22:31:45 +02:00
test_transaction.cpp
)
2025-10-01 23:07:06 +02:00
2025-10-01 23:55:17 +02:00
# The target function must be in a shared library because otherwise it might be in the same code page as the test.cpp functions.
# Between attach and commit the target function's code page is not executable, which can mean our test driver code would not
# be executable.
2025-10-02 20:51:25 +02:00
add_library(mach_detours_tests_lib SHARED
lib_function.c
lib_function.h
2025-10-01 23:46:55 +02:00
)
2025-10-01 23:07:06 +02:00
target_link_libraries(mach_detours_tests
2025-10-01 23:46:55 +02:00
PRIVATE
mach_detours
Catch2::Catch2WithMain
2025-10-02 20:51:25 +02:00
mach_detours_tests_lib
2025-10-01 23:07:06 +02:00
)