mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 13:31:27 +12:00
CMake: Run unit test during build if requested
This commit is contained in:
parent
3b61613d1b
commit
39247fcbc1
2 changed files with 9 additions and 0 deletions
|
@ -34,6 +34,7 @@ option(USE_SYSTEM_OPENCV "Prefer system OpenCV instead of the builtin one" ON)
|
|||
option(HAS_MEMORY_BREAKPOINTS "Add support for memory breakpoints to the interpreter" OFF)
|
||||
option(USE_LTO "Use LTO for building" ON)
|
||||
option(BUILD_RPCS3_TESTS "Build RPCS3 unit tests." OFF)
|
||||
option(RUN_RPCS3_TESTS "Run RPCS3 unit tests. Requires BUILD_RPCS3_TESTS" OFF)
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/buildfiles/cmake")
|
||||
|
||||
|
|
|
@ -239,4 +239,12 @@ if(BUILD_RPCS3_TESTS)
|
|||
|
||||
include(GoogleTest)
|
||||
gtest_discover_tests(rpcs3_test)
|
||||
|
||||
if(RUN_RPCS3_TESTS)
|
||||
add_custom_target(run_tests
|
||||
ALL
|
||||
COMMAND ${CMAKE_CTEST_COMMAND} -j -VV --output-on-failure
|
||||
DEPENDS rpcs3_test
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue