Skip to content

Commit 23eedc5

Browse files
hebastofanquake
andcommitted
build: Skip secp256k1 ctime tests when tests are not being built
Co-authored-by: fanquake <[email protected]>
1 parent a5e9966 commit 23eedc5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ set(SECP256K1_ENABLE_MODULE_RECOVERY ON CACHE BOOL "" FORCE)
4949
set(SECP256K1_BUILD_BENCHMARK OFF CACHE BOOL "" FORCE)
5050
set(SECP256K1_BUILD_TESTS ${BUILD_TESTS} CACHE BOOL "" FORCE)
5151
set(SECP256K1_BUILD_EXHAUSTIVE_TESTS ${BUILD_TESTS} CACHE BOOL "" FORCE)
52+
if(NOT BUILD_TESTS)
53+
# Always skip the ctime tests, if we are building no other tests.
54+
# Otherwise, they are built if Valgrind is available. See SECP256K1_VALGRIND.
55+
set(SECP256K1_BUILD_CTIME_TESTS ${BUILD_TESTS} CACHE BOOL "" FORCE)
56+
endif()
5257
set(SECP256K1_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
5358
include(GetTargetInterface)
5459
# -fsanitize and related flags apply to both C++ and C,

0 commit comments

Comments
 (0)