2020-08-19 08:19:28 +00:00
|
|
|
enable_testing()
|
|
|
|
add_custom_target(unittests)
|
2023-01-29 05:44:50 +00:00
|
|
|
add_custom_command(TARGET unittests POST_BUILD COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
|
2020-08-19 08:19:28 +00:00
|
|
|
|
|
|
|
macro(add_pcsx2_test target)
|
2021-07-04 05:24:21 +00:00
|
|
|
add_executable(${target} EXCLUDE_FROM_ALL ${ARGN})
|
2023-01-04 09:49:41 +00:00
|
|
|
target_link_libraries(${target} PRIVATE gtest gtest_main)
|
|
|
|
if(APPLE)
|
|
|
|
# For some reason this doesn't get pulled in implicitly...
|
|
|
|
target_link_libraries(${target} PRIVATE
|
|
|
|
"-framework Foundation"
|
|
|
|
"-framework Cocoa"
|
2023-01-03 12:23:10 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2021-07-04 05:24:21 +00:00
|
|
|
add_dependencies(unittests ${target})
|
|
|
|
add_test(NAME ${target} COMMAND ${target})
|
2020-08-19 08:19:28 +00:00
|
|
|
endmacro()
|
|
|
|
|
2022-11-25 22:18:20 +00:00
|
|
|
add_subdirectory(common)
|
2023-01-04 09:49:41 +00:00
|
|
|
add_subdirectory(core)
|