mach-detours/tests/CMakeLists.txt
2025-10-02 21:11:17 +02:00

19 lines
No EOL
625 B
CMake

# Copyright (c) Lysann Tranvouez. All rights reserved.
add_executable(mach_detours_tests
test.cpp)
# 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.
add_library(mach_detours_tests_lib SHARED
lib_function.c
lib_function.h
)
target_link_libraries(mach_detours_tests
PRIVATE
mach_detours
Catch2::Catch2WithMain
mach_detours_tests_lib
)