Skip to content

Commit

Permalink
cmake: Emulate GNU Autotools 'make check -jN'
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed May 4, 2023
1 parent bb57453 commit 5ef5bb9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmake/tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,11 @@ if(TARGET test_bitcoin)

add_all_test_targets()
endif()

if(CMAKE_GENERATOR STREQUAL "Unix Makefiles")
# Emulate GNU Autotools 'make check -jN'.
add_custom_target(check
COMMAND @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan \"Running tests...\"
COMMAND ${CMAKE_CTEST_COMMAND} --force-new-ctest-process -$(MAKEFLAGS)
)
endif()

0 comments on commit 5ef5bb9

Please sign in to comment.