do not optimize the test lib
else localFunction in test_local_function is likely inlined and the tests fail
This commit is contained in:
parent
ec870ef992
commit
701d6c78f2
2 changed files with 6 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ add_executable(mach_detours_tests
|
|||
test_threads.cpp
|
||||
test_transaction.cpp
|
||||
)
|
||||
target_compile_options(mach_detours_tests PRIVATE "-O0")
|
||||
|
||||
# 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
|
||||
|
|
@ -15,10 +16,11 @@ add_library(mach_detours_tests_lib SHARED
|
|||
lib_function.c
|
||||
lib_function.h
|
||||
)
|
||||
target_compile_options(mach_detours_tests_lib PRIVATE "-O0")
|
||||
|
||||
target_link_libraries(mach_detours_tests
|
||||
PRIVATE
|
||||
mach_detours
|
||||
Catch2::Catch2WithMain
|
||||
mach_detours_tests_lib
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue