@@ -200,8 +200,8 @@ mark_as_advanced(
200
200
CMAKE_SHARED_LINKER_FLAGS_COVERAGE
201
201
)
202
202
203
+ get_property (is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG )
203
204
if (PROJECT_IS_TOP_LEVEL )
204
- get_property (is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG )
205
205
set (default_build_type "RelWithDebInfo" )
206
206
if (is_multi_config )
207
207
set (CMAKE_CONFIGURATION_TYPES "${default_build_type} " "Release" "Debug" "MinSizeRel" "Coverage" CACHE STRING
@@ -311,10 +311,15 @@ message("Optional binaries:")
311
311
message (" benchmark ........................... ${SECP256K1_BUILD_BENCHMARK} " )
312
312
message (" noverify_tests ...................... ${SECP256K1_BUILD_TESTS} " )
313
313
set (tests_status "${SECP256K1_BUILD_TESTS} " )
314
- if (CMAKE_BUILD_TYPE STREQUAL "Coverage" )
315
- set (tests_status OFF )
314
+ if (tests_status )
315
+ if (is_multi_config )
316
+ set (tests_status "${tests_status} , except for the 'Coverage' configuration" )
317
+ elseif (CMAKE_BUILD_TYPE STREQUAL "Coverage" )
318
+ set (tests_status OFF )
319
+ endif ()
316
320
endif ()
317
321
message (" tests ............................... ${tests_status} " )
322
+ unset (tests_status )
318
323
message (" exhaustive tests .................... ${SECP256K1_BUILD_EXHAUSTIVE_TESTS} " )
319
324
message (" ctime_tests ......................... ${SECP256K1_BUILD_CTIME_TESTS} " )
320
325
message (" examples ............................ ${SECP256K1_BUILD_EXAMPLES} " )
@@ -363,6 +368,14 @@ if(print_msan_notice)
363
368
" to avoid false positives in ctime_tests. Pass -DSECP256K1_BUILD_CTIME_TESTS=OFF to avoid this.\n "
364
369
)
365
370
endif ()
371
+ if ($CACHE{SECP256K1_print_coverage_notice} )
372
+ message (
373
+ "Note:\n "
374
+ " CMake ${CMAKE_VERSION} does not support the '${CMAKE_GENERATOR} ' generator fully. Consequently,\n "
375
+ " the build system will still compile the 'tests' binary for the 'Coverage' configuration,\n "
376
+ " which is meaningless.\n "
377
+ )
378
+ endif ()
366
379
if (SECP256K1_EXPERIMENTAL )
367
380
message (
368
381
" ******\n "
0 commit comments