build: suppress openssl deprecation warnings

Add OPENSSL_SUPPRESS_DEPRECATED compile definition to silence ~30
deprecation warnings for legacy OpenSSL APIs (SHA512_Init/Update/Final,
SHA256_*, RIPEMD160_*, RSA_* functions).

This matches upstream rippled's approach. Full migration to OpenSSL 3.x
EVP APIs will be done when upstream migrates.

Closes #602
This commit is contained in:
Nicholas Dudfield
2025-10-24 10:10:41 +07:00
parent 6f148a8ac7
commit 38b60614dc

View File

@@ -17,7 +17,9 @@ target_compile_features (common INTERFACE cxx_std_20)
target_compile_definitions (common
INTERFACE
$<$<CONFIG:Debug>:DEBUG _DEBUG>
$<$<AND:$<BOOL:${profile}>,$<NOT:$<BOOL:${assert}>>>:NDEBUG>)
$<$<AND:$<BOOL:${profile}>,$<NOT:$<BOOL:${assert}>>>:NDEBUG>
# TODO: Remove once we have migrated functions from OpenSSL 1.x to 3.x.
OPENSSL_SUPPRESS_DEPRECATED)
# ^^^^ NOTE: CMAKE release builds already have NDEBUG
# defined, so no need to add it explicitly except for
# this special case of (profile ON) and (assert OFF)