mach-detours/tests/CMakeLists.txt

19 lines
No EOL
619 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_test_func SHARED
test_func.c
test_func.h
)
target_link_libraries(mach_detours_tests
PRIVATE
mach_detours
Catch2::Catch2WithMain
mach_detours_test_func
)