aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2024-09-12 14:24:26 +0100
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2024-09-12 14:24:26 +0100
commit23eedc5d1e24b3d31da7902ece5182b9b24672d8 (patch)
treead9ceb25ae7a61074433e00d0484c8e8d040cc11 /src
parenta5e99669ccfe0683749ce2e2b21732a359ef62d7 (diff)
build: Skip secp256k1 ctime tests when tests are not being built
Co-authored-by: fanquake <fanquake@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9a76fe1eec..895c17541f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -49,6 +49,11 @@ set(SECP256K1_ENABLE_MODULE_RECOVERY ON CACHE BOOL "" FORCE)
set(SECP256K1_BUILD_BENCHMARK OFF CACHE BOOL "" FORCE)
set(SECP256K1_BUILD_TESTS ${BUILD_TESTS} CACHE BOOL "" FORCE)
set(SECP256K1_BUILD_EXHAUSTIVE_TESTS ${BUILD_TESTS} CACHE BOOL "" FORCE)
+if(NOT BUILD_TESTS)
+ # Always skip the ctime tests, if we are building no other tests.
+ # Otherwise, they are built if Valgrind is available. See SECP256K1_VALGRIND.
+ set(SECP256K1_BUILD_CTIME_TESTS ${BUILD_TESTS} CACHE BOOL "" FORCE)
+endif()
set(SECP256K1_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
include(GetTargetInterface)
# -fsanitize and related flags apply to both C++ and C,