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:")
301
301
message (" benchmark ........................... ${SECP256K1_BUILD_BENCHMARK} " )
302
302
message (" noverify_tests ...................... ${SECP256K1_BUILD_TESTS} " )
303
303
set (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 ()
306
310
endif ()
307
311
message (" tests ............................... ${tests_status} " )
312
+ unset (tests_status )
308
313
message (" exhaustive tests .................... ${SECP256K1_BUILD_EXHAUSTIVE_TESTS} " )
309
314
message (" ctime_tests ......................... ${SECP256K1_BUILD_CTIME_TESTS} " )
310
315
message (" examples ............................ ${SECP256K1_BUILD_EXAMPLES} " )
Original file line number Diff line number Diff line change @@ -137,12 +137,19 @@ if(SECP256K1_BUILD_TESTS)
137
137
add_executable (noverify_tests tests.c )
138
138
target_link_libraries (noverify_tests secp256k1_precomputed secp256k1_asm )
139
139
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} )
145
151
endif ()
152
+ unset (configs )
146
153
endif ()
147
154
148
155
if (SECP256K1_BUILD_EXHAUSTIVE_TESTS )
You can’t perform that action at this time.
0 commit comments