File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed
Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -301,10 +301,15 @@ message("Optional binaries:")
301301message (" benchmark ........................... ${SECP256K1_BUILD_BENCHMARK} " )
302302message (" noverify_tests ...................... ${SECP256K1_BUILD_TESTS} " )
303303set (tests_status "${SECP256K1_BUILD_TESTS} " )
304- if (CMAKE_BUILD_TYPE STREQUAL "Coverage" )
305- set (tests_status OFF )
304+ if (tests_status)
305+ if (CMAKE_GENERATOR STREQUAL "Ninja Multi-Config" )
306+ set (tests_status "${tests_status} , except for the 'Coverage' configuration" )
307+ elseif (CMAKE_BUILD_TYPE STREQUAL "Coverage" )
308+ set (tests_status OFF )
309+ endif ()
306310endif ()
307311message (" tests ............................... ${tests_status} " )
312+ unset (tests_status)
308313message (" exhaustive tests .................... ${SECP256K1_BUILD_EXHAUSTIVE_TESTS} " )
309314message (" ctime_tests ......................... ${SECP256K1_BUILD_CTIME_TESTS} " )
310315message (" examples ............................ ${SECP256K1_BUILD_EXAMPLES} " )
Original file line number Diff line number Diff line change @@ -137,12 +137,19 @@ if(SECP256K1_BUILD_TESTS)
137137 add_executable (noverify_tests tests.c)
138138 target_link_libraries (noverify_tests secp256k1_precomputed secp256k1_asm)
139139 add_test (NAME secp256k1_noverify_tests COMMAND noverify_tests)
140- if (NOT CMAKE_BUILD_TYPE STREQUAL "Coverage" )
141- add_executable (tests tests.c)
142- target_compile_definitions (tests PRIVATE VERIFY)
143- target_link_libraries (tests secp256k1_precomputed secp256k1_asm)
144- add_test (NAME secp256k1_tests COMMAND tests)
140+
141+ add_executable (tests tests.c)
142+ if (CMAKE_GENERATOR STREQUAL "Ninja Multi-Config" )
143+ set_target_properties (tests PROPERTIES EXCLUDE_FROM_ALL $<CONFIG:Coverage>)
144+ endif ()
145+ target_compile_definitions (tests PRIVATE VERIFY)
146+ target_link_libraries (tests secp256k1_precomputed secp256k1_asm)
147+ set (configs ${CMAKE_BUILD_TYPE} ${CMAKE_CONFIGURATION_TYPES} )
148+ list (REMOVE_ITEM configs Coverage)
149+ if (configs)
150+ add_test (NAME secp256k1_tests COMMAND tests CONFIGURATIONS ${configs} )
145151 endif ()
152+ unset (configs)
146153endif ()
147154
148155if (SECP256K1_BUILD_EXHAUSTIVE_TESTS)
You can’t perform that action at this time.
0 commit comments