From 2b9bc0b2d58f6753b2e5b1ab97f30ada3cd16d02 Mon Sep 17 00:00:00 2001 From: Aymeric Fromherz Date: Tue, 18 Jun 2024 23:19:13 +0200 Subject: [PATCH] Fix build for --no-libb2 option --- CMakeLists.txt | 2 ++ benchmarks/blake.cc | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3a1c89d..5ab416bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -527,6 +527,8 @@ if(ENABLE_BENCHMARKS) target_link_directories(${BENCH_NAME} PRIVATE ${LIBB2_LIBRARY_DIRS}) target_include_directories(${BENCH_NAME} PUBLIC ${LIBB2_INCLUDE_DIRS}) target_compile_options(${BENCH_NAME} PUBLIC ${LIBB2_CFLAGS_OTHER}) + else() + target_compile_definitions(${BENCH_NAME} PUBLIC NO_LIBB2) endif(ENABLE_LIBB2_BENCHMARKS) if(ENABLE_LIBTOMCRYPT_BENCHMARKS) diff --git a/benchmarks/blake.cc b/benchmarks/blake.cc index a256a95f..aabcc45f 100644 --- a/benchmarks/blake.cc +++ b/benchmarks/blake.cc @@ -20,8 +20,6 @@ #include "Hacl_Hash_Blake2b_Simd256.h" #endif -#include "blake2.h" - #define HACL_HASH_BLAKE2B_DIGEST_LENGTH_MAX 64 #define HACL_HASH_BLAKE2S_DIGEST_LENGTH_MAX 32