# Copyright (c) Lysann Tranvouez. All rights reserved. add_executable(mach_detours_tests test_dylib_function.cpp test_local_function.cpp test_system_function.cpp test_threads.cpp test_transaction.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 )