mirror of
https://github.com/azahar-emu/azahar.git
synced 2026-06-06 02:33:44 -04:00
cmake: Allow Catch test discovery
Allows individual unit-tests to be discovered, tested, and debugged by IDEs without having to run _all_ of the unit-tests just to debug one specific test.
This commit is contained in:
parent
ba6f8cb744
commit
e7a31da01b
2 changed files with 5 additions and 0 deletions
1
externals/CMakeLists.txt
vendored
1
externals/CMakeLists.txt
vendored
|
|
@ -60,6 +60,7 @@ if (ENABLE_TESTS)
|
|||
add_subdirectory(catch2)
|
||||
endif()
|
||||
target_link_libraries(catch2 INTERFACE Catch2::Catch2WithMain)
|
||||
include(Catch)
|
||||
endif()
|
||||
|
||||
# Crypto++
|
||||
|
|
|
|||
|
|
@ -36,6 +36,10 @@ if (ENABLE_LIBRETRO)
|
|||
endif()
|
||||
|
||||
add_test(NAME tests COMMAND tests)
|
||||
if(NOT ANDROID)
|
||||
catch_discover_tests(tests)
|
||||
endif()
|
||||
|
||||
|
||||
if (CITRA_USE_PRECOMPILED_HEADERS)
|
||||
target_precompile_headers(tests PRIVATE precompiled_headers.h)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue