Files
ARMSX2/tests/ctest/CMakeLists.txt
T

28 lines
868 B
CMake
Raw Normal View History

2020-08-19 03:19:28 -05:00
enable_testing()
add_custom_target(unittests)
2023-01-28 23:44:50 -06:00
add_custom_command(TARGET unittests POST_BUILD COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
2020-08-19 03:19:28 -05:00
macro(add_pcsx2_test target)
2021-07-04 00:24:21 -05:00
add_executable(${target} EXCLUDE_FROM_ALL ${ARGN})
2026-01-17 15:13:28 +00:00
target_link_libraries(${target} PRIVATE gtest)
if(APPLE)
# For some reason this doesn't get pulled in implicitly...
target_link_libraries(${target} PRIVATE
"-framework Foundation"
"-framework Cocoa"
2023-01-03 22:23:10 +10:00
)
endif()
2021-07-04 00:24:21 -05:00
add_dependencies(unittests ${target})
add_test(NAME ${target} COMMAND ${target})
2023-08-24 13:47:37 +10:00
if(MSVC AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# For some reason, the stack refuses to grow with the latest MSVC updates.
# Just force the commit size to 1MB for now.
set_target_properties(${target} PROPERTIES LINK_FLAGS "/STACK:1048576,1048576")
endif()
2020-08-19 03:19:28 -05:00
endmacro()
add_subdirectory(common)
add_subdirectory(core)