Add option of using blocking random

This commit is contained in:
Robin Lindén
2019-05-08 21:40:04 +02:00
parent de9a59c96f
commit 4933dc3fb7

View File

@@ -4,6 +4,7 @@ project("sodium")
option(SODIUM_DISABLE_TESTS "Disable tests" OFF)
option(SODIUM_MINIMAL "Only compile the minimum set of functions required for the high-level API" OFF)
option(SODIUM_ENABLE_BLOCKING_RANDOM "Enable this switch only if /dev/urandom is totally broken on the target platform" OFF)
add_library(${PROJECT_NAME}
libsodium/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c
@@ -267,6 +268,7 @@ target_compile_definitions(${PROJECT_NAME}
$<$<BOOL:${SODIUM_MINIMAL}>:SODIUM_LIBRARY_MINIMAL>
PRIVATE
$<$<BOOL:${BUILD_SHARED_LIBS}>:SODIUM_DLL_EXPORT>
$<$<BOOL:${SODIUM_ENABLE_BLOCKING_RANDOM}>:USE_BLOCKING_RANDOM>
$<$<BOOL:${SODIUM_MINIMAL}>:MINIMAL>
)